How to launch a coroutine without blocking current coroutine, and then launch another coroutine and wait for its result? #436
Replies: 4 comments 2 replies
-
|
After some exploration, it turns out:
|
Beta Was this translation helpful? Give feedback.
-
p.s. |
Beta Was this translation helpful? Give feedback.
-
|
This is bad, we should provide a full-functional, out-of-box executor to users. |
Beta Was this translation helpful? Give feedback.
-
|
It will be better to call |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's assume we have two coroutine functions:
What I want to do is like the code below in JavaScript:
I try to write code like this, but it doesn't work as expected
Result:
runwill block at linecoro1().start([](auto &&_) {});until coro1 finishesBeta Was this translation helpful? Give feedback.
All reactions