isolatengine

Last updated:

0 purchases

isolatengine Image
isolatengine Images
Add to Cart

Description:

isolatengine

Isolate procedure call engine. #
Usage #
void _entry(SendPort sendPort) async {
final receivePort = ReceivePort();
final engine = Isolatengine(receivePort, sendPort);
engine['ping'] = (param, cancelable, notify) async{
return 'pong';
};
await engine.receiveContinuously();
}

void startEngine(){
final receivePort = ReceivePort();
this.engine = Isolatengine(receivePort);
Isolate.spawn(_entry, receivePort.sendPort);
engine.receiveContinuously();
}
copied to clipboard
And now you can call emit or deliver function. #
final r = await engine.deliver('ping');
copied to clipboard
Try the example for more usage. #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.