dart-lang / dart-lang/language

It is necessary to implement threads

Open
#333 190 comments 271 reactions 0 assignees View on GitHub
feature
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

It is necessary to implement threads, because in the majority of platforms that run Dart supports thread, such as Android, iOS, Windows, Linux, MacOS, * WebAssembly etc.

Many use cases where thread can be used easily and quickly to speed up the processing of tasks.
I use enough threads in Java Android / Linux and C #.

Threads can communicate with each other more easily than processes.

Isolated objects do not share compiled code or JavaScript objects and therefore can not share changeable data as pthreads.

Although the Isolate can provide concurrent programming behavior, it does not have the advantages of the threads, because with the threads there is shared memory and with the Isolate there is not. There are many advantages to threads over multiple processes such as lower memory consumption, another advantage of using a thread-based model is that it is fast, threads are lighter than Processes.
Another disadvantage of using a process-based model is that it will be slower. You will have to copy data between the competing parts of your program.

This does not mean that you have to abandon the Isolated Processes, but instead add another option to the most common cases where you want to accelerate an algorithm that can be easily and quickly paralleled with Threads

* It would be nice if Dart already had an AOT compiler or a VM for WebAssembly
* WebAssembly threads ready to experiment

Contributor guide

Open the contributing guide

Research direction

Start by reading the issue and its 190-comment discussion to understand the unresolved requirements and existing positions. The payload names no files, tests, or entry points; done would require an agreed design for adding threads alongside isolates.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.