Module futures_channel::lock

source ·
Expand description

A “mutex” which only supports try_lock

As a futures library the eventual call to an event loop should be the only thing that ever blocks, so this is assisted with a fast user-space implementation of a lock that can only have a try_lock operation.

Structs

  • Lock 🔒
    A “mutex” around a value, similar to std::sync::Mutex<T>.
  • TryLock 🔒
    Sentinel representing an acquired lock through which the data can be accessed.