executorservices 1.0.0 copy "executorservices: ^1.0.0" to clipboard
executorservices: ^1.0.0 copied to clipboard

outdated

A Dart package providing services that allow you to execute dart code in different executors, ex - isolates.

A library for Dart and Flutter developers.

Created from templates made available by Stagehand under a BSD-style license.

Usage #

A simple usage example:

import "package:executorservices/executorservices.dart";
import "dart:math";

main() {
  final cachedExecutorService = ExecutorService.newCachedExecutor();

  cachedExecutorService.submitAction(randomInt);

  cachedExecutorService.submit(SomeIntensiveTask());
}

int randomInt() {
  return Random.secure().nextInt(1000);
}

class SomeIntensiveTask extends Task<String> {
  @override
  Future<String> execute() async {
    await Future.delayed(Duration(minutes: 5));
    return "Done executing intensive task";
  }
} 

Features and bugs #

Please file feature requests and bugs at the issue tracker.

4
likes
0
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package providing services that allow you to execute dart code in different executors, ex - isolates.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta

More

Packages that depend on executorservices