Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .then() continuation to Task<T> #39

merged 4 commits into from
Jan 8, 2022

Add .then() continuation to Task<T> #39

merged 4 commits into from
Jan 8, 2022


Copy link

@danvratil danvratil commented Jan 8, 2022

When it is not possible to co_await a coroutine, we may still want to handle the result
of the coroutine asynchronously. This change introduces Task<T>::then() continuation,
which can be passed a callback that is invoked when the coroutine represented by the Task

@danvratil danvratil added the enhancement New feature or request label Jan 8, 2022
Copy link

github-actions bot commented Jan 8, 2022

Unit Test Results

  6 files   -   1    6 suites   - 1   2m 42s ⏱️ -17s
13 tests ±  0  13 ✔️ +1  0 💤 ±0  0  - 1 
74 runs   - 11  74 ✔️  - 9  0 💤 ±0  0  - 2 

Results for commit 83e0a5b. ± Comparison against base commit 3f5900a.

♻️ This comment has been updated with latest results.

Sometimes it's not possible to co_await a Task, but it would still be
useful to handle the result of the asynchronous operation. This change
introduces a Task::then() member function, which takes a callback as
an argument. The callback will be invoked when the Task is finished.
@danvratil danvratil changed the title [WIP] Add .then() continuation to task Add .then() continuation to Task<T> Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
enhancement New feature or request
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant