Constructors
Properties
Protected
Optional
_currentWork
_currentWork?: Work
Protected
_working
_working: boolean
Protected
_works
_works: Work[]
Accessors
isWorking
- get isWorking(): boolean
Returns boolean
size
- get size(): number
Returns number
Methods
cancel
- cancel(): void
Returns void
cancelCurrentWork
- cancelCurrentWork(): void
Returns void
clear
- clear(): void
Returns void
Protected
dequeue
- dequeue(): Promise<void>
Returns Promise<void>
enqueue
- enqueue<T>(work): Promise<T>
Returns Promise<T>
Name
AsyncQueue
Description
A queue to process async works in sequence, only one work is processed at a time