Crate defer_drop
source ·Expand description
A utility type that allows you to defer dropping your data to a background
thread. See DeferDrop
for details.
Inspired by https://abramov.io/rust-dropping-things-in-another-thread
Features
serde
: when enabled, adds aSerialize
andDeserialize
implementation toDeferDrop
Structs
Wrapper type that, when dropped, sends the inner value to a global
background thread to be dropped. Useful in cases where a value takes a
long time to drop (for instance, a windows file that might block on close,
or a large data structure that has to extensively recursively trawl
itself).