0 purchases
tribbles
A Dart library for working with large numbers of Isolates.
Usage #
A simple usage example:
import 'package:tribbles/tribbles.dart';
void hi(ConnectFn connect, ReplyFn reply) {
// you MUST always call connect() in the worker function you pass to a Tribble
// otherwise the Tribble will not be fully initialised
connect().listen((message) {
print('[Tribble received] $message');
});
}
main() {
final tribble = Tribble(hi);
}
copied to clipboard
See the sample code for a more completed example of using Tribble.
A more complex example showing how to use large numbers of Tribbles is also available.
Note if you wish, you can compare performance (memory, clock time and cpu usage) of the multi Tribble example by compiling AOT to a executable using: dart compile exe example/multi_example.dart.
Features and bugs #
Please file feature requests and bugs at the issue tracker.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.