wasi-threads: add thread-spawn over host OS threads and shared memory - #386
Open
MaxDesiatov wants to merge 2 commits into
Open
wasi-threads: add thread-spawn over host OS threads and shared memory#386MaxDesiatov wants to merge 2 commits into
thread-spawn over host OS threads and shared memory#386MaxDesiatov wants to merge 2 commits into
Conversation
MaxDesiatov
force-pushed
the
maxd/wasi-thread-spawn
branch
from
July 24, 2026 00:33
f64a1be to
dd5b362
Compare
MaxDesiatov
commented
Jul 24, 2026
MaxDesiatov
marked this pull request as ready for review
July 24, 2026 17:46
MaxDesiatov
force-pushed
the
maxd/wasi-thread-spawn
branch
from
July 24, 2026 17:47
77b3fa2 to
35e0048
Compare
… memory New `thread-spawn` import per wasi-threads spec spawns a POSIX thread per call that re-instantiates the module over the group's shared memory and runs `wasi_thread_start`. A trap or `proc_exit` on any thread signals a shared flag that the others observe at call boundaries and `memory.atomic.wait`, then unwind.
MaxDesiatov
force-pushed
the
maxd/wasi-thread-spawn
branch
from
August 3, 2026 15:51
35e0048 to
6da545d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New
thread-spawnimport per wasi-threads spec spawns a POSIX thread and re-instantiates the module over the group's shared memory and runswasi_thread_start. A trap orproc_exiton any thread signals a shared flag that the others observe at call boundaries andmemory.atomic.wait, then unwind.