guys I cant believe this <
# coroutines
guys I cant believe this;;t=36m54s

how can they executes 100000 sleeps(1sec) in a thread pool and the whole result only takes a bit more than 1 sec?!!? what kind of magic lays behind that!? 😱
mingkangpan: The key point is they are using
which is suspendable - NOT `sleep`… Using sleep would still block each thread
You still have to use caution when introducing blocking code, rather than suspendable code, into coroutines
yeah I realised afterwards too, suspending is not blocking do you think you can also execute 100k io bounded requests parallel? r.g. suspending 100k http requests?
yes I recon so
I was at a Vert.x talk the other day where the guys mentioned they are going to be adding Kotlin Coroutine wrappers quite soon
In a similar vein to their Rx wrappers presumably;hw=i7&amp;test=plaintext This is plain Vert.x (in 2013) handling ~650k requests in a second - I wouldn’t expect a huge dent in that number by then offloading to a coroutine context - but you could probably get a hold of the benchmark code to try it out