Is QtPromise based on Coroutine? #53
Unanswered
seyedmmousavi
asked this question in
Q&A
Replies: 2 comments 1 reply
-
@seyedmmousavi No, it's not compatible with coroutines. I think @pwuertz had a look at adding support for coroutines, but I don't remember exactly the conclusions. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The conclusion was that QtPromise is a very convenient foundation for implementing an async coroutine framework. QtPromise::QPromise<void> async_func_1()
{
co_await ...;
co_return;
} .. or as an awaitable within coroutine functions: QtPromise::QPromise<void> async_func_2()
{
co_await async_func_1();
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My question is simple. Is QtPromise based on Coroutine?
Beta Was this translation helpful? Give feedback.
All reactions