-
Notifications
You must be signed in to change notification settings - Fork 106
How do you yield* with async/await? #100
Comments
@kittens Given the following: (They deleted their comment...) async function a() {
await x; // must wait for this
await y; // AND this
}
async function b() {
await a(); // previously `yield* a()`
} do you mean Always or only when multiple exist/are run? |
Similar issue: #61 |
Async functions with multiple awaits still only return a single promise, which is resolved once the function has finished. With multiple In your example, when |
Because an async function that awaits on promises itself returns a promise that is resolved when the async function return, |
Hmm, ok. Looks/sounds like this is the default behavior. In a bit of hindsight that makes sense. That being said I am running into problems related to this, but not really this issue. |
Hi there, I was looking to move my CLI tool org-labels over to async/await as an experiment, using node+v8-5.2 &
--harmony_async_await
.I've noticed there does not immediately appear to be a replacement for
yield*
, as with theco
library.That is, it is unclear what you need to do to wait for all
await
s to resolve within anasync
function...The text was updated successfully, but these errors were encountered: