Skip to content

Allow emscripten_atomic_wait_suspending to return synchronously#26947

Open
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:emscripten_atomic_wait_suspending2
Open

Allow emscripten_atomic_wait_suspending to return synchronously#26947
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:emscripten_atomic_wait_suspending2

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented May 14, 2026

Followup to the initial version landed in #26941

@sbc100 sbc100 requested a review from tlively May 14, 2026 03:44
Comment thread system/lib/libasync.c
em_settled_result_t result = emscripten_promise_await(promise);
if (result.result != EM_PROMISE_FULFILL) {
__builtin_abort();
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some way to avoid writing these three lines? i.e. should we have a version if emscripten_promise_await that lets rejected promises propogate to the top level instead of handling them ourselves?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant