Struct crayon::sched::latch::CountLatch
source · pub struct CountLatch { /* private fields */ }
Expand description
Counting latches are used to implement scopes. They track a counter. Unlike
other latches, calling set()
does not necessarily make the latch be
considered set()
; instead, it just decrements the counter. The latch is
only “set” (in the sense thatis_set()
returns true) once the counter reaches zero.
Implementations§
source§impl CountLatch
impl CountLatch
pub fn new() -> CountLatch
pub fn increment(&self)
Trait Implementations§
source§impl Debug for CountLatch
impl Debug for CountLatch
source§impl Default for CountLatch
impl Default for CountLatch
source§fn default() -> CountLatch
fn default() -> CountLatch
Returns the “default value” for a type. Read more