hazard pointer synchronous reclamationcom/facebook/folly under synchronization/Hazptr.h Is Asynchronous Reclamation Always Enough? delete ptr shutdown_resource_X() Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael Example: Concurrency TS2 – Maged Michael Same example but using hazard pointer deferred reclamation ptr-retire() shutdown_resource_X() ~Foo() { use_resource_X (); } Foo* ptr = new Foo; Remove ptr Some use cases need synchronous Concurrency TS2 – Maged Michael ptr-retire() ~Foo() { use_resource_X (); } Foo* ptr = new Foo; Remove ptr shutdown_resource_X() No problem - No use of unavailable resource Concurrency TS2 Global Cleanup Performance0 码力 | 31 页 | 856.38 KB | 6 月前3
共 1 条
- 1













