Module interlock::raw[][src]

Expand description

Raw synchronization primitives.

  • RawIntervalRwLock provides a non-blocking (fallible) interface, similar to std::sync::RwLock::try_write.

  • RawBlockingIntervalRwLock provides a blocking (infallible) interface, similar to std::sync::RwLock::write.

  • RawAsyncIntervalRwLock provides a Future-based interface, something that could be used to build a high-level interface like futures::lock::Mutex.

Notes

  • These traits’ methods take Pin<&Self> as the receiver. This means that the trait implementations of client-provided types such as Index are not prevented to recursively call into these methods. This does not lead to an undefined behavior but may cause a panic or abort.

Modules

futureasync

The thread-safe, Future-oriented implementation.

The thread-unsafe (but faster) implementation.

syncstd

The thread-safe, blocking implementation that uses std’s interthread synchronization API.

Traits

A Future-based interface to a specialized readers-writer lock optimized for interval locks.

A blocking interface to a specialized readers-writer lock optimized for interval locks.

A non-blocking interface to a specialized readers-writer lock optimized for interval locks.