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§

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

Enums§