Skip to main content

try_consume

Function try_consume 

Source
fn try_consume(atomic: &AtomicUsize, want: usize) -> bool
Expand description

Atomically subtracts want from atomic if at least want is available. Returns true on success.