Crate semaphore [−] [src]
Atomic counting semaphore that can help you control access to a common resource by multiple processes in a concurrent system.
Features
- Fully lock-free* semantics
- Provides RAII-style acquire/release API
- Implements
Send,SyncandClone
* when not using the shutdown API
Structs
| Guard |
An RAII guard used to release access to the semaphore automatically when it falls out of scope. |
| Semaphore |
An atomic counter that can help you control shared access to a resource. |
| ShutdownHandle |
A handle representing the shutdown process of a semaphore. |
| UnguardedRef |
An unguarded reference to a resource. |
Enums
| TryAccessError |
An error indicating a failure to acquire access to the resource behind the semaphore. |