Record Barrierpub

Source
:record(pub) Barrier
  .count (Int 0..)
Description

Rendezvous point for n participants. .wait blocks until all n participants have arrived.

Fields

.count Int(0..)

Implementations

impl Barrier

The no-poison policy and the locality-on-guards rule are file-level invariants, enforced by the signatures above: every lock method returns its guard (or (Option guard)) directly instead of (Result guard PoisonError), and the guard types are declared with the default global locality (the spec's local attribute lands when the checker allows local return types — see divergence #1).

.barrier-wait ( Barrier Barrier )

Block the calling OS thread until n participants have called .wait. In a single-task Silo program with a barrier constructed by barrier-new (which coerces 0 to 1), the barrier is always already full so this call returns immediately.