Documentation ¶
Overview ¶
Package queue provides a simple queue primitive that blocks on Pop() until an entry is available and can block on Push() when a size limit is applied.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue[A any] struct { // contains filtered or unexported fields }
Queue is a simple generic queue that uses a backing array.
func (*Queue[A]) Close ¶
func (q *Queue[A]) Close()
Close closes the queue. This should be called by the sender after all Add() calls have finished. Calling Add() after Close() is considered an error.
Click to show internal directories.
Click to hide internal directories.