SimpleTaskQueue class

Optimized queue to execute Futures in order with improved performance.

Key optimizations:

  • Reduced async overhead in processing loop
  • Eliminated recursive processing calls
  • Added performance monitoring capabilities
  • Improved error handling and resource management
  • Better memory efficiency with object pooling
Implemented types

Constructors

SimpleTaskQueue({String? name})

Properties

hashCode int
The hash code for this object.
no setterinherited
isCancelled bool
no setteroverride
metrics TaskQueueMetrics
latefinaloverride-getter
queueLength int
Returns the current queue length for monitoring
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add<T>(Future<T> closure()) Future<T>
Adds a Future-returning closure to the queue.
override
cancel() → void
Cancels the queue.
override
clear() → void
Removes all pending tasks from the queue.
override
dispose() → void
Disposes the queue and releases any associated resources.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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