Isolates
Most computers, even on mobile platforms, have multi-core CPUs.To take advantage of all those cores, developers traditionally useshared-memory threads running concurrently. However, shared-stateconcurrency is error prone and can lead to complicated code.
Instead of threads, all Dart code runs inside of isolates. Eachisolate has its own memory heap, ensuring that no isolate’s state isaccessible from any other isolate.
For more information, see the following:
- Dart asynchronous programming: Isolates and event loops
- dart:isolate API reference,including Isolate.spawn() andTransferableTypedData
- Background parsing cookbook on the Flutter site
- Isolate sample app