-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub teamIssue has been triaged by sub teamtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
The Shared Memory Multithreading for Dart proposal outlines a number of modifications to the Dart native runtime and core libraries which would unlock interoperability use cases which currently require developers to writing additional native code.
These modifications include:
- Introduction of shared fields - static fields which are shared between all isolates in a group. In shared native memory multithreading only fields containing trivially shareable objects are allowed to be marked as shared.
- Introduction of shared isolates - each isolate group has a dedicated isolate which does not contain any isolated state. An attempt to run code in this isolate which accesses non-shared field will throw an exception.
- API extensions to
dart:ffi:-
NativeCallable.shared
-
There might be other changes to core libraries which would help the cause but is not necessarily required:
- Helpers for atomic reads and writes in
dart:ffi. - API extensions to
dart:isolate-
Isolate.shared -
Isolate.postTask. -
Isolate.runSync.
-
- Introduction of
dart:concurrent.-
AtomicRef,AtomicInt32,AtomicInt64 -
MutexandCondition.
-
These changes do not fundamentally alter Dart's isolate model - pure Dart code running in different isolates remains isolated, but introduce more straightforward way to bridge concurrency chasm between native world (which is structured around threads) and Dart (which is structured around isolates).
lntls, ClementBeal, mateusfccp, AbdeMohlbi, halildurmus and 51 moreinsinfo, MaherSafadii and SAGARSURIinsinfo, MaherSafadii, filiph, xeard and SAGARSURIinsinfo, MaherSafadii and SAGARSURIinsinfo, MaherSafadii and SAGARSURI
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub teamIssue has been triaged by sub teamtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Type
Projects
Status
In Progress