isolatengine 0.1.1 copy "isolatengine: ^0.1.1" to clipboard
isolatengine: ^0.1.1 copied to clipboard

isolate communication engine.

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();
}

And now you can call emit or deliver function. #

final r = await engine.deliver('ping');

Try the example for more usage. #

0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

isolate communication engine.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

npc

More

Packages that depend on isolatengine