BatchQueue<T> constructor
BatchQueue<T> ({
- required int batchSize,
- int timeout = 500,
- required BatchFunction<
T> executeBatch,
Creates a new BatchQueue.
batchSize specifies the maximum number of items to process in a single batch.
timeout specifies the time in milliseconds to wait before processing an
incomplete batch. Defaults to 500ms.
executeBatch is the function that will be called to process each batch of items.
Implementation
BatchQueue({
required this.batchSize,
this.timeout = 500, // unit is in ms
required this.executeBatch,
});