Created
June 1, 2022 03:55
-
-
Save MBkkt/24ee420d083c70c52c31fc557c9ed2eb to your computer and use it in GitHub Desktop.
blbl
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
bool await_ready(); | |
... await_suspend(handle); | |
V await_resume(); | |
Channel<V, 1> ch; | |
ch.~Channel() -- while (...) {} | |
V value = co_await ch.Recv(); | |
co_await ch.Send(v); | |
1) void | |
2) bool -- true, false | |
3) corountine_handle -- symmetric transfer | |
handle.resume/destroy() | |
Kek kek = co_await m.lock(); | |
auto awaiter = m.lock(); | |
if (!awaiter.await_ready()) { | |
builtin_suspend(awaiter) -------> awaiter.await_suspend(previos_self) | |
} | |
awaiter.await_resume(); | |
Mutex m | |
auto guard = co_await m.lock(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment