Skip to content

Regarding multithreading #481

@TudbuT

Description

@TudbuT

I've recently forked graaljs and forcefully enabled multithreading by removing the throw statement (a very dirty way to do it, i know. i just wanted to test if multithreading works in practice), and the results were surprisingly very good. Compared to other slight interop issues, this one was quite unnoticable. In fact, during multiple benchmarks, i only got minor inconsistencies that can be avoided by not benchmarking and instead using it normally, or writing your code in such a way that two threads don't try to use the same JS variables too much. During normal use, i've had zero issues with 4 threads accessing the context at once.

This is NOT an actual bug report. I just want to make the suggestion to add an option, for example 'js.EnableMultithreading', and making it experimental. There are multiple other issues with interop that don't matter in practice so i think we shouldn't be denied mutithreading completely. I might later start a pull request to add an option (if i manage to add an option that is :/ ).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions