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

[k2] implement wait_concurrently #1223

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

apolyakov
Copy link
Contributor

@apolyakov apolyakov commented Jan 22, 2025

This pull request introduces wait_concurrently by adding a new coroutine type called shared_task_t. This new type will replace task_t in all contexts where forks are utilized.

The shared_task_t coroutine type allows multiple co_await operations from different parts of the code. It keeps track of all the awaiters that need to be resumed once it completes. Like task_t, shared_task_t also supports cancellations.

@apolyakov apolyakov self-assigned this Jan 22, 2025
@apolyakov apolyakov force-pushed the apolyakov/k2-wait-concurrently branch from 52e47f6 to d073190 Compare January 27, 2025 09:00
@apolyakov apolyakov marked this pull request as ready for review January 27, 2025 16:23
@apolyakov apolyakov added the k2 k2 related label Jan 27, 2025
@apolyakov apolyakov added this to the next milestone Jan 27, 2025
runtime-light/coroutine/shared_task.h Outdated Show resolved Hide resolved
runtime-light/coroutine/shared_task.h Outdated Show resolved Hide resolved
runtime-light/coroutine/shared_task.h Outdated Show resolved Hide resolved
runtime-light/coroutine/shared_task.h Outdated Show resolved Hide resolved
runtime-light/coroutine/shared_task.h Outdated Show resolved Hide resolved
runtime-light/coroutine/shared_task.h Outdated Show resolved Hide resolved
runtime-light/coroutine/shared_task.h Outdated Show resolved Hide resolved
@DrDet DrDet modified the milestones: 06.02.2025, next Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k2 k2 related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants