thunk
: Generic lazy evaluation for RustThe thunk
crate provides primitives for lazy evaluation in Rust.
At present, it provides three thunk types and a trait which encapsulates lazily
evaluated types, Lazy
. The thunk types are as follows:
unsync::Thunk
: non-Send
, non-Sync
thunks.sync::Thunk
: Send + Sync
thunks which use atomic data internally. This is
slower than unsync::Thunk
, but sync::Thunk
is thread-safe.strict::Thunk
: Send + Sync
, paradoxically strict thunks. strict::Thunk
doesn't actually defer anything, and is provided to make it simpler to write
code which is generic over strictness.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.