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

antoin_m

10/17/2018, 1:45 PM
Hey 🙂 Quick stupid question. When you’re in a coroutine and call a blocking java function (like a guava future’s get method) does it block the whole thread? I’d say yes but then how do you handle libraries that use that kind of future internally?
l

louiscad

10/17/2018, 1:54 PM
Yes, there is no magic that transforms blocking calls into non blocking ones in Kotlin.
d

dekans

10/17/2018, 2:27 PM
<http://Dispatchers.IO|Dispatchers.IO>
is the one to use with blocking calls
👍 1
2 Views