Join Slack
Out of curiosity, why isn't `runBlocking` in the standard library? Since you can suspend without kot...
# coroutines
d
Dominaezzz
09/24/2018, 1:08 PM
Out of curiosity, why isn't
runBlocking
in the standard library? Since you can suspend without kotlinx.coroutines, shouldn't you be able to at least block without it?
s
spand
09/24/2018, 1:30 PM
You cant block in javascript
d
Dominaezzz
09/24/2018, 1:41 PM
Oh.
runBlocking
doesn't work in JavaScript? Didn't know that.
s
spand
09/24/2018, 1:55 PM
Responses to say an http request must be handled by the event loop on the main thread but since that is blocked by
runBlocking
how would that work out ?
➕ 1
u
uli
09/24/2018, 2:00 PM
makes sense. thanks
@spand
👍 1
g
gildor
09/24/2018, 2:42 PM
Yes, you cannot implement runBlocking on JS to work the same way as on JVM
10
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by