Page MenuHomePhabricator

[RCU] Implement RCUPtr, a smart pointer that free asynchronousely when other threads did synchronize.
ClosedPublic

Authored by deadalnix on Jan 18 2019, 20:21.

Details

Summary

This will make the memory managaement for the RadixTree significantly easier and even allow the tree to share some of its innard with the outside world.

Depends on D2317

Test Plan

Adde unt tests for the various behaviors implemented.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
rcuptr
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4582
Build 7227: Bitcoin ABC Buildbot (legacy)
Build 7226: arc lint + arc unit

Event Timeline

Use a factory method instead of a free function for make

Fabien requested changes to this revision.Jan 24 2019, 14:35
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/rcu.h
159

What prevents from using a signed ?

src/test/rcu_tests.cpp
205

desturction => destruction

This revision now requires changes to proceed.Jan 24 2019, 14:35
src/rcu.h
159

Because that can only be a mistake as you'd truncate you range in half and gain nothing.

This revision is now accepted and ready to land.Jan 28 2019, 17:56
This revision was automatically updated to reflect the committed changes.