emscripten-core / emscripten-core/emscripten
Allow emscripten_fetch in Asyncify
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Currently there is a perceived inconsistency between APIs like `emscripten_sleep` and `emscripten_fetch`: while both perform sort of an async I/O, one of them works with Asyncify, while another works only by compiling code in a separate thread.
Technically, there is no reason for this discrepancy, and it should be possible to allow APIs like `emscripten_fetch` with just Asyncify if user wants it to run on the main thread instead of a separate one.
Perhaps this is a more general issue though and there should be some shared mechanism for all such APIs to choose between Asyncify and thread-based blocking depending on compile flags?
Contributor guide
Assessment
This issue has not been assessed yet.