Crate semaphore

Source
Expand description

Atomic counting semaphore that can help you control access to a common resource by multiple processes in a concurrent system.

§Features

  • Effectively lock-free* semantics
  • Provides RAII-style acquire/release API
  • Implements Send, Sync and Clone

* lock-free when not using the shutdown API

Structs§

  • Counting semaphore to control concurrent access to a common resource.
  • RAII guard used to release access to the semaphore automatically when it falls out of scope.
  • Handle representing the shutdown process of a semaphore, allowing for extraction of the underlying resource.

Enums§

  • Error indicating a failure to acquire access to the resource behind the semaphore.

Type Aliases§