Module len_caching_lock::mutex
source · [−]Structs
Guard comprising MutexGuard and AtomicUsize for cache
Can be used in place of a Mutex where reading T’s len() without
needing to lock, is advantageous.
When the Guard is released, T’s len() will be cached.
The cached len() may be at most 1 lock behind current state.