ConcurrentTaskBatch<T extends Object>.from constructor
ConcurrentTaskBatch<T extends Object>.from (
- ConcurrentTaskBatch<
T> other
Creates a new batch from an existing one, copying its configuration and tasks.
Implementation
factory ConcurrentTaskBatch.from(ConcurrentTaskBatch<T> other) {
final newBatch = ConcurrentTaskBatch<T>(
eagerError: other._eagerError,
minTaskDuration: other._minTaskDuration,
onError: other._onError,
);
newBatch.tasks = Queue.from(other.tasks);
return newBatch;
}