Additional samples for Concurrency in Dart.
bin/send_and_receive.dart
: Demonstrates how to spawn a workerIsolate
withIsolate.run
.Isolate.run
executes the specified function and returns the result to the main isolate efficiently usingIsolate.exit
which avoids copying.bin/long_running_isolate.dart
: Similar tosend_and_receive.dart
, except that the spawned isolate is long running, responds to incoming messages from the main isolate, and sends responses until it receives anull
over itsSendPort
.