Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶ added in v2.5.0
type Queue[T any] struct { // contains filtered or unexported fields }
Queue thread-safe Queue using ring-buffer
func (*Queue[T]) Close ¶ added in v2.5.0
func (q *Queue[T]) Close()
Close the queue and discard all entries in the queue all goroutines in wait() will return
func (*Queue[T]) CloseRemaining ¶ added in v2.5.0
func (q *Queue[T]) CloseRemaining() []T
CloseRemaining will close the queue and return all entries in the queue. All goroutines in wait() will return.
func (*Queue[T]) IsClosed ¶ added in v2.5.0
IsClosed returns true if the queue has been closed The call cannot guarantee that the queue hasn't been closed while the function returns, so only "true" has a definite meaning.
func (*Queue[T]) Pop ¶ added in v2.5.0
Pop removes the QueueItem from the front of the queue If false is returned, it either means 1) there were no items on the queue or 2) the queue is closed.
Click to show internal directories.
Click to hide internal directories.