Module locks

Module locks 

Source
Expand description

Lock strategies.

§Safety

This crate requires that only one writer be active at a time. It is the caller’s responsibility to uphold th is guarantee.

Note: if multiple writers are active, it is the caller’s responsibility to ensure that each writer is configured with an appropriate lock strategy. For example, mixing the LockDisabled strategy with any other strategy is incorrect because it disables lock checks from one of the synchronizers.

Structs§

DisabledGuard
LockDisabled
Lock protection is disabled.
SingleWriter
Acquire the lock. Once acquired, hold the lock until dropped.
SingleWriterGuard
A simple guard which does not release the lock upon being dropped.

Traits§

WriteLockStrategy
The write lock strategy supports different lock implementations which can be chosen based on the guarantees required, platform support, and performance constraints.