delayqueue

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 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[T]] struct {
	// contains filtered or unexported fields
}

func NewDelayQueue

func NewDelayQueue[T Delayed[T]]() *DelayQueue[T]

func (*DelayQueue[T]) Add

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

func (*DelayQueue[T]) Take

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

type Delayed

type Delayed[T any] interface {
	DelayMs() int64
	comparator.Comparable[T]
}

Jump to

Keyboard shortcuts

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