Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigation: Multi-threaded dispatch #2

Open
jakmeier opened this issue Oct 3, 2020 · 0 comments
Open

Investigation: Multi-threaded dispatch #2

jakmeier opened this issue Oct 3, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@jakmeier
Copy link
Owner

jakmeier commented Oct 3, 2020

Right now, nuts only works in a single thread. All data is stored in the thread-local storage object NUT. If there are multiple threads (non-web) then there will be multiple such nuts that are completely oblivious of each other.

The idea to be captured by this issue is that there could be multiple nuts that communicate with each other and the work split between them. Activities in different domains could live in different nuts. Messages would be forwarded to all nuts, but the state stored in domains could be kept in a single nut (= single thread).

Once this works on a non-web target, the feature can be extended to work on the web too, using web workers that communicate with the browser API's message passing. This would allow to have easy multi-threading in WASM, even without browser support for SharedArrayBuffer and WebAssembly threads.

@jakmeier jakmeier added the enhancement New feature or request label Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant