Skip to main content

acquire_owned

Function acquire_owned 

Source
pub async fn acquire_owned(sem: &Arc<Semaphore>) -> OwnedSemaphorePermit
Expand description

Acquire one owned permit (for spawned tasks).

Product code never calls Semaphore::close; a closed semaphore is a programming fault. We still must not panic on product paths (G-SEC-03): recover by admitting through an ephemeral open semaphore of capacity 1 so one-shot work can finish and surface a normal error elsewhere if needed.