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

outdated

isolate communication 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.receive();
}

void startEngine(){
    final receivePort = ReceivePort();
    this.engine = Isolatengine(receivePort);
    Isolate.spawn(_entry, receivePort.sendPort);
    engine.receive();
}

And now you can call emit or deliver function. #

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

For more usage, please run the example app. #

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

isolate communication engine.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cancelable

More

Packages that depend on isolatengine