simple_async_executor

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

simple async executor

Simple async executor #
This packages provides a simple API to handle asynchronous tasks.
Currently it supports only sequential execution, but in next releases it will be extended to support also priority queues.
Usage #
To use this package you need to import it:
import 'package:simple_async_executor/simple_async_executor.dart';
copied to clipboard
and then build your executor:
final executor = BaseExecutor<void, void>(
initialTasks: [
AsyncTask(1, (_) async {
// do something
}),
AsyncTask(2, (_) async {
// do something
}),
],
maxConcurrentTasks: 3,
);
copied to clipboard
and then run the tasks defined:
executor.executeAll();

/// Gets the result of the [AsyncTask] with the given id
final result = await executor.getResult(1);
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator