Documentation ¶
Overview ¶
Package mpsc provides an efficient implementation of a multi-producer, single-consumer lock-free queue.
The Push function is safe to call from multiple goroutines. The Pop and Empty APIs must only be called from a single, consumer goroutine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue[T any] struct { // contains filtered or unexported fields }
func (*Queue[T]) Empty ¶ added in v1.9.18
Empty returns true if the queue is empty
Empty must be called from a single, consumer goroutine
Click to show internal directories.
Click to hide internal directories.