queue

package
v1.16.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Run    func() error
	OnFail func(error)
}

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

prefers users with fewer running jobs, otherwise it's FIFO

func NewQueue

func NewQueue(queueSize, numWorkers int) *Queue

func (*Queue) Enqueue

func (q *Queue) Enqueue(owner syntax.DID, job Job) bool

todo(dawn): add a per-user cap so a single user can't fill the queue

func (*Queue) Start

func (q *Queue) Start()

func (*Queue) Stop

func (q *Queue) Stop()

Source Files

  • queue.go

Jump to

Keyboard shortcuts

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