simple_async_executor 0.0.2 copy "simple_async_executor: ^0.0.2" to clipboard
simple_async_executor: ^0.0.2 copied to clipboard

Basic async executor for Dart and Flutter

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';

and then build your executor:

final executor = BaseExecutor<void, void>(
    initialTasks: [
        AsyncTask(1, (_) async {
            // do something
        }),
        AsyncTask(2, (_) async {
            // do something
        }),
    ],
    maxConcurrentTasks: 3,
);

and then run the tasks defined:

executor.executeAll();

/// Gets the result of the [AsyncTask] with the given id
final result = await executor.getResult(1);
1
likes
150
points
24
downloads

Publisher

verified publishersmaso.it

Weekly Downloads

Basic async executor for Dart and Flutter

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

async, collection, flutter

More

Packages that depend on simple_async_executor