emscripten-core / emscripten-core/emscripten
WasmFS: real poll/select support
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Mostly opening for tracking as I saw TODOs in the code but no issues for those yet.
I had to work around missing poll/select support in the old filesystem with Asyncify and/or proxying in several projects over the years. Given that WASMFS was designed with async ops in mind, I'd like to stop hacking around it in the future and be able to rely on Emscripten doing the right thing.
To clarify, old filesystem did have poll/select support, but it only checked the status of files, and didn't block waiting for the first available handle or a timeout, which is not the expected behaviour and breaks apps that rely on it.
The new filesystem seems to be in a similar position, except select is completely no-op for now.
Ideally it should use something like `Promise.any` to wait for events from any of given file descriptors and wake on the first one.
Contributor guide
Assessment
This issue has not been assessed yet.