-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
wasm-proposal:threadsIssues related to the WebAssembly threads proposalIssues related to the WebAssembly threads proposal
Description
In #5326, we discussed extensively how to resolve the build errors related to fd_fdstat_set_flags, a wasi-common function. When attempting to apply locking to wasi-common to enable multi-threaded access, this function was the sole remaining issue preventing the implementation of WasiSnapshotPreview1 from using &self (what we wanted to switch to) instead of the current &mut self. If fd_fdstat_set_flags could take &self instead, this would result in a variety of benefits:
- there would be no need to wrap
WasiCtx(and friends) in an inner structure containing anArc; theArccould be applied to the top-levelHoststructure instead - all of
WasiSnapshotPreview1could be implemented in terms of&selfinstead of&mut self - several supporting
derive(Clone)and mutating functions could go away
At some point I had heard of discussions to modify this API; if and when that happens, the above improvements could be made.
Metadata
Metadata
Assignees
Labels
wasm-proposal:threadsIssues related to the WebAssembly threads proposalIssues related to the WebAssembly threads proposal