Crate init_once

Source
Expand description

The init_once crate provides a mechanic to attempt to read a value without blocking the caller, in case it is being initialized concurrently. Such an abstraction might be useful in cache implementations whose consumers might not want to block on the cache to fill up with data.

Structs§

InitOnce
Lazily initialize a value of some arbitrary type T. Reading the value doesn’t block the caller, if it is being initialized concurrently.
PollInit
Polling mechanism to initialize a value contained in some InitOnce instance.

Enums§

InitState
Initialization state of an InitOnce instance.