forked from scylladb/seastar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coroutine: add buffer support to async generator
before this change, the design of generator (quoting Avi's comment): > This effectively forces a ping-pong between the generator and its user. > The generator will have to yield each time it produces a value. after this change, we have two variants of generator - one which always suspends itself so its caller can consume the produced value. - one which buffers the yielded values until the buffer is full, by then, it suspends itself, and wait for the consumer to grab a value from it. please note, due to llvm/llvm-project#49689, the new generator does not compile with clang-15 + {debug,sanitize} mode. but the old version compiles and runs fine with the same combinatino. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
- Loading branch information
Showing
4 changed files
with
561 additions
and
93 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.