fearless.sharing

D implementation of Rust's std::sync::Mutex

Members

Aliases

Exclusive
alias Exclusive(T) = shared(ExclusiveImpl!T)
Undocumented in source.

Functions

gcExclusive
auto gcExclusive(A args)

A new exclusive reference to a payload of type T constructed from args. Allocated on the GC to make sure its lifetime is infinite and therefore safe to pass to other threads.

gcExclusive
auto gcExclusive(T payload)

A new exclusive reference to a payload. Allocated on the GC to make sure its lifetime is infinite and therefore safe to pass to other threads.

rcExclusive
auto rcExclusive(A args)

A reference counted exclusive object (see above).

rcExclusive
auto rcExclusive(Allocator allocator, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

ExclusiveImpl
struct ExclusiveImpl(T)

Provides @safe exclusive access (via a mutex) to a payload of type T. Allows to share mutable data across threads safely.

Meta