emscripten-core / emscripten-core/emscripten

WasmFS: real poll/select support

Open
#20,615 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.