Skip to main content

Module semaphore

Module semaphore 

Source
Expand description

Async counting semaphore.

acquire() returns a real Future — call it with .await from an async fn task. The waiting task’s identity is read from crate::executor::current_task, so no manual priority/index bookkeeping is needed by the caller.

Safe to release() from either task context or an ISR.

Structs§

Acquire
Future returned by Semaphore::acquire.
Semaphore
An async counting semaphore.