delayqueue

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DelayQueue

type DelayQueue[T Delayed] struct {
	// contains filtered or unexported fields
}

func NewDelayQueue

func NewDelayQueue[T Delayed](cmp comparator.Comparable[T]) *DelayQueue[T]

func (*DelayQueue[T]) Add

func (dq *DelayQueue[T]) Add(val T)

func (*DelayQueue[T]) Take

func (dq *DelayQueue[T]) Take(timeUnit time.Duration, quit <-chan struct{}) (val T, exit bool)

type Delayed

type Delayed interface {
	Delay() int64
	comparable
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL