Created
November 30, 2021 11:17
-
-
Save HappyCerberus/10de1956d4eb1670a040cbdffac50bf6 to your computer and use it in GitHub Desktop.
[Article] C++20 Practical Coroutines - scheduler final
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
void schedule(CoroutineWithContinuation auto &coro) { | |
handle_.promise().scheduled_.push_back(coro.handle_); | |
coro.handle_.promise().continuation = handle_; | |
} | |
void register_emitter(std::unique_ptr<EventEmitter> emitter); | |
void run() { handle_.resume(); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment