package gate

Import Path
	internal/gate (on go.dev)

Dependency Relation
	imports one package, and imported by one package

Involved Source Files Package gate contains an alternative condition variable.
Package-Level Type Names (only one)
/* sort by: | */
A Gate is a monitor (mutex + condition variable) with one bit of state. The condition may be either set or unset. Lock operations may be unconditional, or wait for the condition to be set. Unlock operations record the new state of the condition. Lock acquires the gate unconditionally. It reports whether the condition is set. LockIfSet acquires the gate if and only if the condition is set. Unlock sets the condition and releases the gate. WaitAndLock waits until the condition is set before acquiring the gate. If the context expires, WaitAndLock returns an error and does not acquire the gate. func New(set bool) Gate
Package-Level Functions (only one)
New returns a new, unlocked gate.