Created
February 5, 2019 09:04
-
-
Save aep/d3ac5c8566c4098c1d5defaa292f22ab to your computer and use it in GitHub Desktop.
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
#[osaka] | |
fn foo(poll: Poll, a: Stream, b: Stream) { | |
loop { | |
let again = match a.read() { | |
Ready => do something, | |
Again => a, | |
}; | |
match b.read() { | |
Ready => do something | |
Again => yield a.merge(b) | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment