Skip to content

wasi-threads: add thread-spawn over host OS threads and shared memory - #386

Open
MaxDesiatov wants to merge 2 commits into
mainfrom
maxd/wasi-thread-spawn
Open

wasi-threads: add thread-spawn over host OS threads and shared memory#386
MaxDesiatov wants to merge 2 commits into
mainfrom
maxd/wasi-thread-spawn

Conversation

@MaxDesiatov

Copy link
Copy Markdown
Member

New thread-spawn import per wasi-threads spec spawns a POSIX thread and 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
MaxDesiatov force-pushed the maxd/wasi-thread-spawn branch from f64a1be to dd5b362 Compare July 24, 2026 00:33
Comment thread Sources/WasmKit/Execution/StoreAllocator.swift Outdated
@MaxDesiatov
MaxDesiatov marked this pull request as ready for review July 24, 2026 17:46
@MaxDesiatov
MaxDesiatov force-pushed the maxd/wasi-thread-spawn branch from 77b3fa2 to 35e0048 Compare July 24, 2026 17:47
… 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
MaxDesiatov force-pushed the maxd/wasi-thread-spawn branch from 35e0048 to 6da545d Compare August 3, 2026 15:51
Comment thread Package.swift Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants