Seamlessly launch isolates to perform side jobs.
import 'package:go/go.dart';
int twice(int a) => a * 2;
main() async {
print(await go(twice, 5));
}
import 'package:go/go.dart';
int twice(int a) => a * 2;
main() async {
Task twiceTask = remoteTask(twice);
print(await twiceTask(5));
}
import 'package:go/go.dart';
int twice(int a) => a * 2;
main() async {
print(await goMap(twice, new List.generate(10, (int d) => d + 1)));
}
Executes same task many times with same parameters.
int twice(int a) => a * 2;
main() async {
print(await goMany(twice, 5, 20));
}
int twice(int a) => a * 2;
main() async {
final Herd<int, int> many = await herd(twice, 5);
print(await many.execSame(5));
print(await many.exec([10, 11, 12, 13, 14]));
await many.shutdown();
}