package
Version:
v0.1.3-testnet
Opens a new window with list of versions in this module.
Published: Dec 2, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Queue[T any] struct {
}
Queue implements variable and adaptive size FIFO queue. Unlike channels, never jams
func New[T any](consume func(e T)) *Queue[T]
func (q *Queue[T]) Close(processRemaining bool)
Close queue must be closed in order to close channels and stop goroutines
func (q *Queue[T]) Push(e T, priority ...bool)
Push places element into the queue optionally with priority
Source Files
¶
Click to show internal directories.
Click to hide internal directories.