Documentation ¶
Overview ¶
Package wqueue implements a work queue, with independent internal subqueues.
Inspired by Brian C. Mills' "Rethinking Classical Concurrency Patterns" talk, specifically the queue that passes data between putters and workers to coordinate state changes between channels.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue[K comparable] struct { // contains filtered or unexported fields }
Queue is a work queue, consisting of multiple subqueues which can operate independently while sharing the same workers.
func NewQueue ¶
func NewQueue[K comparable](limit int) *Queue[K]
NewQueue creates a new Queue which can grow to a maximum size of limit.
Click to show internal directories.
Click to hide internal directories.