emscripten-core / emscripten-core/emscripten

Allow emscripten_fetch in Asyncify

Open
#12,255 8 comments 0 reactions 0 assignees View on GitHub
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

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.