Skip to content

Allow emscripten_fetch in Asyncify #12255

Open
@RReverser

Description

@RReverser

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions