Documentation
¶
Overview ¶
Package sendqueue orders cold-path admission with FIFO permits.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permit ¶
type Permit struct {
// contains filtered or unexported fields
}
Permit is one reservation in a Queue. Its links and membership are guarded by the queue's mutex; queue and ready are immutable after construction.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue grants its head permit and parks later reservations. Its zero value is ready to use. A Queue must not be copied after first use.
func (*Queue) Drained ¶
func (q *Queue) Drained() <-chan struct{}
Drained returns one stable completion channel, also before Seal. It closes only once the generation is sealed and empty; callers never allocate a per-waiter signal.
func (*Queue) Reserve ¶
Reserve appends a permit and reports whether it started an empty queue. It panics if the queue was sealed; callers holding a stale queue use TryReserve.