Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue[T comparable] struct { // contains filtered or unexported fields }
Queue is a generic Queue implementation.
func NewQueue ¶
func NewQueue[T comparable]() *Queue[T]
func (*Queue[T]) GetOrWaitWithDone ¶
type WeightQueue ¶
type WeightQueue[T comparable] struct { // contains filtered or unexported fields }
func NewWeightQueue ¶
func NewWeightQueue[T comparable]() *WeightQueue[T]
func (*WeightQueue[T]) AddWeight ¶
func (q *WeightQueue[T]) AddWeight(item T, weight int) <-chan struct{}
func (*WeightQueue[T]) Get ¶
func (q *WeightQueue[T]) Get() (T, int, func(), bool)
func (*WeightQueue[T]) GetOrWaitWithDone ¶
func (q *WeightQueue[T]) GetOrWaitWithDone(done <-chan struct{}) (T, int, func(), bool)
func (*WeightQueue[T]) Len ¶
func (q *WeightQueue[T]) Len() int
Click to show internal directories.
Click to hide internal directories.