Expand description
Deferred drop handling.
We sometimes have Arc<dyn Participant>s we have obtained but don’t want to drop yet
See the top-level docs for context.
When we drop the Arc, the refcount might become zero.
Then the inner type would be dropped.
The inner type is allowed to call back into us (for example, it may drop an Account).
We must therefore not drop a caller’s Participant with our own state lock held.
This module has a helper type for assuring that we do defer drops.
Structs§
- Guard
With 🔒Deferred Drop MutexGuard<State>but also a list ofArc<dyn Participant>to drop when we unlock
Type Aliases§
- Deferred
Drop 🔒 - Participants we’ve acquired and which we want to drop later, convenience alias