Skip to content

Instantly share code, notes, and snippets.

@HappyCerberus
Created November 30, 2021 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HappyCerberus/10de1956d4eb1670a040cbdffac50bf6 to your computer and use it in GitHub Desktop.
Save HappyCerberus/10de1956d4eb1670a040cbdffac50bf6 to your computer and use it in GitHub Desktop.
[Article] C++20 Practical Coroutines - scheduler final
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