https://kotlinlang.org logo
#coroutines
Title
# coroutines
g

groostav

04/08/2017, 8:57 PM
I guess I get a performance win if, rather than use the blocking
readMessage
method, I write a suspending function on top of the event-callback for https://msdn.microsoft.com/en-us/library/windows/desktop/aa365788(v=vs.85).aspx
e

elizarov

04/09/2017, 10:12 AM
You seem to be on a right path. Coroutines will help you if you switch from blocking to non-blocking(async) IO. This will open a door of doing multiple things in the single thread with predictable cooperative scheduling.
5 Views