Recent documentation about Dart Isolates


I recently started with Dart ( and really like it so far.
A very promising feature are isolates, but I am not sure on how to start.

The documentation I found so far is from before a breaking change (BREAKING CHANGE: dart:isolate) in October 2013. The information in this “Breaking change” email is quite complicated and it looks like the new api is more complicated than the old.

I’ve got some questions:

  • Is the dart:isolate api stable?
  • Is there any up-to-date documentation?
  • Are there any working examples?

Thanks for any help,
Hendrik Jan


I tried this example and it works

import "dart:isolate";

void main() {
  var sPort = new ReceivePort();
  SendPort rPort;
  sPort.listen((msg) {
    if (msg is SendPort) {
      print("Host got port. sending back");
      rPort = msg;
    else print("Host got $msg");
void test(sender) {
  var rPort = new ReceivePort();
    print("Worker got $msg");
    if (msg!=null)
      sender.send("I am worker");
    else rPort.close();

Isolates seem not to be used too much yet so there may still be some bugs.
The latest problems I remember reading about was debugging code running in isolates. I don’t know if this is solved yet.
It also depends if you want to use isolates on the server or in the browser.
AFAIK it’s more stable in the VM.

Answered By – Günter Zöchbauer

Answer Checked By – Cary Denson (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *