Documentation ¶
Overview ¶
Package taskqueue provides a simple asynchronous task queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger func(v ...any)
Logger provides a way to log panics caused by workers in a queue.
type Option ¶
type Option func(*Queue)
Option defines an option for the queue.
func Depth ¶
Depth sets the depth of the queue. Calls to Submit() will block when this number of tasks are already pending execution. Pass in a negative number to use an unbounded queue. Defaults to unbounded.
func RecoveryHandler ¶ added in v1.14.0
func RecoveryHandler(recoveryHandler errs.RecoveryHandler) Option
RecoveryHandler sets the recovery handler to use for tasks that panic. Defaults to none, which silently ignores the panic.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue holds the queue information.
Click to show internal directories.
Click to hide internal directories.