WASIX + WAI: Thread Spawning and Process Forking
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
FDhandles) , 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
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.
Feel free to reopen the issue if it has been closed by mistake.