ExclusiveImpl

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

Constructors

this
this(A args)

The constructor is responsible for initialising the payload so that it's not possible to escape it.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Aliases

borrow
alias borrow = lock
Undocumented in source.

Functions

isLocked
bool isLocked()

Whether or not the mutex is locked.

lock
auto lock()

Obtain exclusive access to the payload. The mutex is locked and when the returned Guard object's lifetime is over the mutex is unloked.

Structs

Guard
struct Guard
Undocumented in source.

Meta