[−][src]Crate lazy_init
A crate for things that are
- Lazily initialized
- Expensive to create
- Immutable after creation
- Used on multiple threads
Lazy<T>
is better than Mutex<Option<T>>
because after creation accessing
T
does not require any locking, just a single boolean load with
Ordering::Acquire
(which on x86 is just a compiler barrier, not an actual
memory barrier).
Structs
Lazy |
|
LazyTransform |
|