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
/* | |
Example use (from an email I sent) | |
I’m using WhenAny to either register for a callback on any of the pending operations and to use | |
the IO thread that comes up with their respective completion or to execute handling of completed | |
work on the current thread (‘borrowing’ the IO thread). | |
So if I read from a socket and from a queue, first both ops hang. Queue read completes and I get | |
called back on an IO thread which continues the await. I process that completion in the loop. | |
Meanwhile the socket read completes. That IO thread pops up and just registers the fact that it’s |