-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
Description
Currently, val::awaiter requires that the enclosing coroutine is also a val. It requires this because it communicates rejections directly to the val::promise_type, without the need for exceptions (this does lead to a bug though: #25396).
However, I would find it very useful to be able to await vals in other coroutine types, to await async JS functions in asynchronous C++ code using some other asynchronous library offering coroutines. I don't know if this could be made to work without exceptions enabled, so maybe make it conditional on that? See also related #25396 (comment).
Emscripten version: 4.0.22 (0f3d2e6)