Struct pool_barrier::Barrier [] [src]

pub struct Barrier { /* fields omitted */ }

A stack allocated synchronisation barrier. See crate doc for use.

Methods

impl Barrier
[src]

Create a new barrier

  • n : the exact number of checkpoints to be generated, all of which must be cleared before wait() unblocks

Change the number of checkpoints that have to be cleared on the next barrier activation.

Activate the barrier producing an ActiveBarrier. The returned ActiveBarrier can then produce checkpoints which may be passed to worker threads, and will block on wait() or drop() until checkpoints are cleared.

The number of Checkpoints that must be generated and cleared each time the barrier is activated.