AsyncQueue class Null safety

AsyncQueue

a queue of async jobs that ensure those jobs will be execute in order, first come first serve

Constructors

AsyncQueue()
initialize normal queue
AsyncQueue.autoStart()
initialize auto queue
factory

Properties

hashCode int
The hash code for this object.
read-only, inherited
isClosed bool
true if the queue is closed, no more job can be added
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size int
current size of the queue
read-only

Methods

addJob(AsyncJob job, {String? label, String? description, int retryTime = 1}) → void
Add new job into the queue
addJobThrow(AsyncJob job, {String? label, String? description, int retryTime = 1}) → void
Add new job in to the queue
addQueueListener(QueueListener listener) → void
Queue listener, emit event that indicate state of the queue
clear([Function? callBack]) → void
stop the queue and clear the history
close() → void
close the queue so that no more job can be added
getJobInfo(String label) JobInfo
get job info of a specific job by its label
list() List<JobInfo>
get the list of job info of the queue
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
retry() → void
retry
start() Future<void>
to start the execution of jobs in queue
stop([Function? callBack]) → void
stop and remove all remain jobs in queue
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited