Skip to content

It is necessary to implement threads #333

@insinfo

Description

@insinfo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureProposed language feature that solves one or more problems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions