The "event" class is driven by events, "eventchain" is used to store "events", "event" can co_await in "awaiter" during data preparing, and resume "awaiter" when data was ready.
An awaiter will automatically resume to the upper coroutine when it completed.
At 2023-09-29 21:23:48, "Jens Maurer" <jens.maurer@gmx.net> wrote: >Hi, > >I'd suggest that you read https://isocpp.org/std/submit-a-proposal in detail. > >You've shown a few coroutine-based examples on that page, but it's unclear >to me what the actual interface to the underlying functionality is. > >Which part does your library provide, and which part does the user have >to provide? A Redis client library, for example, is not part of the >C++ standard. Do you propose to make it so? > >Please also see P2300 for a more general execution framework > >https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2300r7.html > >(including interfacing with coroutines), and > >https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2762r1.pdf > >for integrating networking in that sender/receiver framework. > >What does your library offer that the combination of these two >proposals does not provide? > >Jens > > >On 29/09/2023 15.09, zys via Std-Proposals wrote: >> The c++20 coroutine is a high-performance coroutine solution, but it has not become popular, because there is no encapsulation that satisfies everyone. >> The author provides a set of event-based encapsulation to separate from IO, network, and business code. Developers no longer need to implement coroutine encapsulation and can quickly convert existing asynchronous programs into coroutine programs. >> >> The author's source code address is£ºhttps://github.com/dou1984/coev <https://github.com/dou1984/coev> >>