HomePhabricator

[RCU] Add new features to RCUPtr

Description

[RCU] Add new features to RCUPtr

Summary:

  • Make constructor private and add factory methods to clear up ownership.
  • Add a release method for the RCUPtr to give up ownership.
  • Add get method to get the underlying pointer.
  • Add operator* overloads.
  • Add an explicit convertion to bool that checks for null

Test Plan: Added tests cases that uses all these methods.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox, teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2350

Details

Provenance
deadalnixAuthored on Jan 19 2019, 15:40
deadalnixPushed on Jan 29 2019, 23:23
Reviewer
Restricted Project
Differential Revision
D2350: [RCU] Add new features to RCUPtr
Parents
rABC77afb6c05669: [RCU] Implement RCUPtr, a smart pointer that free asynchronousely when other…
Branches
Unknown
Tags
Unknown