0PricingLogin
Dart Academy · Lesson

Spawning Isolates and Message Passing

Communicate through SendPort and ReceivePort.

Going Manual

For long-lived, chatty workers you spawn an isolate yourself with Isolate.spawn. You stay in control of its whole lifetime.

The Entry Point

Isolate.spawn needs a top-level function as its entry point, plus one argument to send it at startup.

Isolate.spawn(worker, message);

All lessons in this course

  1. Why Isolates, Not Threads
  2. Isolate.run for Quick Offloading
  3. Spawning Isolates and Message Passing
  4. Compute-Heavy Tasks Without Jank
← Back to Dart Academy