wasmer icon indicating copy to clipboard operation
wasmer copied to clipboard

WASIX + WAI: Thread Spawning and Process Forking

Open theduke opened this issue 3 years ago • 1 comments

For WAI generated bindings to work correctly with WASIX, they need to support both thread spawning and process forking.

In particular this means:

  • threads: the context generated by WAI must be thread-safe, and must be cloneable and shareable, so we can use the same context for different thread instances. There also must be a way to initialize bindings for a new instance with the existing context (including the FD tables!)
  • forking: the context must expose a way to mirror / duplicate an existing context (including things like FD handles) , which can then be used for forked processes

Note: currently custom bindings are only used for wasix_http_client, so the impact is limited at the moment, but using the client together with WASIX threads or processes is currently broken, unless each process/thread constructs a new client instead of sharing / sending a specific client across threads or using an existing client in a newly forked process.

@Michael-F-Bryan

theduke avatar Jan 27 '23 15:01 theduke

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 03 '24 22:05 stale[bot]

Feel free to reopen the issue if it has been closed by mistake.

stale[bot] avatar Jun 05 '24 01:06 stale[bot]