Crate semaphore [] [src]

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

Features

  • Provides RAII-style atomic acquire and release
  • Implements Send, Sync and Clone
  • Can block until count to drops to zero (useful for implementing shutdown)

Structs

Guard

An RAII guard used to release a semaphore automatically when it falls out of scope.

Semaphore

An atomic counter which can be shared across processes.