background

package
v0.0.0-...-94ae2f2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

Queue manages background tasks execution

func NewQueue

func NewQueue() *Queue

NewQueue creates a new background queue for managing background tasks execution.

func (*Queue) Close

func (q *Queue) Close()

func (*Queue) Enqueue

func (q *Queue) Enqueue(ctx context.Context, fn func(context.Context))

func (*Queue) Wait

func (q *Queue) Wait()

Wait waits for all active tasks to complete. It does not prevent new tasks from being enqueued while waiting.

Jump to

Keyboard shortcuts

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