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.

Trait Implementations

impl<T> Drop for SemaphoreGuard<T>
[src]

[src]

Executes the destructor for this type. Read more

impl<T: Sized> Deref for SemaphoreGuard<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.