async_tools 0.1.7 copy "async_tools: ^0.1.7" to clipboard
async_tools: ^0.1.7 copied to clipboard

Useful data structures and tools for async/Future code

example/async_tools_example.dart

import 'package:async_tools/async_tools.dart';

Future<void> main() async {
  final waitSet = WaitSet<void, void>();
  for (var n = 0; n < 10; n++) {
    waitSet.add((_) async => Future.delayed(Duration(seconds: n), () {
          // ignore: avoid_print
          print('$n');
        }));
  }
  await waitSet();
}
1
likes
140
points
106
downloads

Publisher

verified publisherveilid.com

Weekly Downloads

Useful data structures and tools for async/Future code

Repository (GitLab)
View/report issues

Documentation

API reference

Funding

Consider supporting this project:

veilid.org

License

MPL-2.0 (license)

Dependencies

collection, freezed_annotation, stack_trace

More

Packages that depend on async_tools