Module git_features::threading[][src]

Expand description

Type definitions for putting shared ownership and synchronized mutation behind the threading feature toggle.

That way, single-threaded applications will not have to use thread-safe primitives, and simply do not specify the ‘threading’ feature.

Functions

Downgrade a handle previously obtained with upgrade_ref_to_mut() to drop mutation support.

Get a mutable reference through a MutableOnDemand for read-write access.

Get a shared reference through a MutableOnDemand for read-only access.

Get an upgradable shared reference through a MutableOnDemand for read-only access.

Get a mutable reference through a Mutable for read-write access.

Map a read guard into a sub-type it contains.

Map an upgradable read guard into a sub-type it contains.

Upgrade a handle previously obtained with get_ref_upgradeable() to support mutation.

Type Definitions

A mapped reference created from a RefGuard

A synchronization primitive which provides read-write access right away.

A synchronization primitive which can start read-only and transition to support mutation.

A reference counted pointer type for shared ownership.

A guarded reference suitable for safekeeping in a struct.