package
Version:
v0.9.0
Opens a new window with list of versions in this module.
Published: Aug 5, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package barrier coordinates participants with epoch isolation and bounds.
View Source
var (
ErrClosed = errors.New("barrier: closed")
ErrFull = errors.New("barrier: participant bound exceeded")
ErrEpoch = errors.New("barrier: epoch mismatch")
ErrDuplicate = errors.New("barrier: duplicate participant")
ErrPolicy = errors.New("barrier: policy not satisfied")
)
Barrier is an epoch-scoped rendezvous.
Arrive registers participant identity for this epoch and may release waiters.
Close fails the barrier and wakes waiters.
Count returns current participants.
Released reports whether the barrier has released.
Wait blocks until the policy is satisfied or ctx ends.
Config configures a Barrier.
Policy selects release conditions.
const (
PolicyMinimumCount Policy = "minimum-count"
PolicyQuorum Policy = "quorum"
PolicyExact Policy = "exact"
PolicyAll Policy = "all"
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.