Stream: general

Topic: The currently implementation for threading


view this post on Zulip Dennis Zhang (Jun 20 2024 at 19:13):

Hi community,

Is there any implementation for threading in Wasmtime? I'm looking for functionality similar to fork or thread creation as seen in traditional operating systems. Specifically, I'm interested in:

  1. Thread Creation: How can I create and manage threads within a Wasmtime instance? Is there a standard API or library that provides threading support?

  2. Concurrency: What are the best practices for handling concurrent execution in Wasmtime? Are there any examples or documentation on how to implement concurrency effectively?

  3. Shared State: How can I share state between threads? Are there any built-in mechanisms or patterns recommended for shared memory or message passing between threads in Wasmtime?

  4. Synchronization: What synchronization primitives are available (e.g., mutexes, semaphores) for managing access to shared resources?

Any guidance, examples, or references to relevant documentation would be greatly appreciated.

Thanks in advance!

view this post on Zulip bjorn3 (Jun 20 2024 at 19:38):

wasi-threads is supported by Wasmtime. It has a hard dependency on wasip1 however and doesn't work with wasip2.


Last updated: Dec 23 2024 at 12:05 UTC