This crate provides functionality for thread-safe and non-thread-safe lazy evaluation in Rust. It also provides functionality for generically working with thunks of a given type.
Three different owned thunk types are provided, implementing
Thunk: a non thread-safe thunk.
AtomicThunk: a thread-safe thunk, which implements
Send + Sync.
Strict: a strict, non-deferred thunk which always immediately
evaluates whatever computation it's given, intended for genericity over
In addition, two shared thunk types are provided, implementing
RcThunk: a reference-counted thunk type. This is a wrapper over
ArcThunk: an atomically reference-counted thunk type. This is a wrapper