Struct semaphore::SemaphoreGuard
[−]
[src]
pub struct SemaphoreGuard<T> { /* fields omitted */ }
RAII guard used to release access to the semaphore automatically when it falls out of scope.
Returned from Semaphore::try_access
.
Sharing guards
There are cases where, once acquired, you want to share a guard between multiple threads
of execution. This pattern can be implemented by wrapping the acquired guard into an Rc
or Arc
reference.