coroutine: add Coroutine::AsyncQueue and immediate evaluation support in LeafAwaitable - #46885
Draft
penguingao wants to merge 32 commits into
Draft
coroutine: add Coroutine::AsyncQueue and immediate evaluation support in LeafAwaitable#46885penguingao wants to merge 32 commits into
penguingao wants to merge 32 commits into
Conversation
…itable Signed-off-by: Peng Gao <pengg@google.com>
…yncQueue Signed-off-by: Peng Gao <pengg@google.com>
…haring issues in AsyncQueue Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
penguingao
force-pushed
the
coroutine_async_queue_jetski
branch
from
August 22, 2026 13:11
b92c22e to
1b43a77
Compare
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Implements AsyncQueue and SharedCapacity using coroutine async primitives (AsyncEvent), providing FIFO async channels, bounded capacity management, move-only type support, and direct handoff semantics. Signed-off via git commit -s. Signed-off-by: Peng Gao <pengg@google.com>
…ere appropriate Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
…_jetski Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
Contributor
Author
|
/retest |
Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
This reverts commit 7a9abb9. Signed-off-by: Peng Gao <pengg@google.com>
…ferences Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
…tests Avoid immediately-invoked lambda coroutines with captures in AsyncQueueTest and SemaphoreTest to prevent stack-use-after-scope under ASan. Pass Semaphore by reference to coroutine task in DestructionWhileProcessWaitersScheduled so the test retains sole ownership of the Semaphore shared_ptr. TAG=agy CONV=1167748b-3e90-4d8d-8e9c-4f141b6cbdd2 Signed-off-by: Peng Gao <pengg@google.com>
Signed-off-by: Peng Gao <pengg@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message:
Add a
Coroutine::AsyncQueueimplementation. This is a useful utility to pass buffer / items among coroutines. Immediate use case is in APM's AI filter manager implementation that's forthcoming in a next PR.AsyncQueue::pushandAsyncQueue::popcan be used withco_await. Non-blocking methods are available.The implementation can share capacity among multiple instances. It's typical for a buffer to be passed in a chain of queues, and we'd like the total bytes in the queues to be bound in size.
I used AI to generate this PR. I have read the code and understand it.
Additional Description:
Risk Level: low - new utility
Testing: unit tests
Docs Changes: N/A - internal utility
Release Notes: N/A - internal utility
Platform Specific Features: no