Documentation
¶
Overview ¶
Package execqueue implements an ordered asynchronous queue for executing functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecQueue ¶
type ExecQueue struct {
// contains filtered or unexported fields
}
func (*ExecQueue) RunSync ¶
RunSync waits for the queue to be drained and then synchronously runs f. It returns an error if the queue is closed before f is run or ctx expires.
func (*ExecQueue) Shutdown ¶
func (q *ExecQueue) Shutdown()
Shutdown asynchronously signals the queue to stop.
func (*ExecQueue) ShutdownAndWait ¶ added in v1.102.0
ShutdownAndWait signals the queue to stop, discards any queued functions that have not started, and waits for the currently executing function, if any, to complete or ctx to expire.
It must not be called while holding a lock that a queued function may acquire, or it will not return until ctx expires.
Click to show internal directories.
Click to hide internal directories.