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

kirillrakhman

05/15/2017, 5:19 PM
@gildor I'm playing around with retrofit coroutines and I noticed that the following trivial program never terminates. any ideas?
Copy code
fun main(args: Array<String>) = runBlocking(CommonPool) {
    val result = service.someCall().awaitResponse()
    println(result)
}
g

gildor

05/15/2017, 7:03 PM
kirillrakhman: Hmm, that’s really strange. I will check later.
k

kirillrakhman

05/15/2017, 7:03 PM
should I create an issue for tracking it?
g

gildor

05/15/2017, 7:04 PM
Yes, it would be nice
k

kirillrakhman

05/15/2017, 7:04 PM
g

gildor

05/15/2017, 7:53 PM
I couldn’t reproduce this issue unfortunately, could you check my comment and gist with code
j

joshr

06/21/2019, 6:35 PM
really late on this, but i'm seeing this same issue
g

gildor

06/22/2019, 1:21 AM
@joshr have you checked discussion on issue 14?
j

joshr

06/22/2019, 1:27 AM
I haven't messed around with the threadpool stuff yet
interestingly though the last time I messed with this it wasn't 60 seconds, it was until I killed it myself
@kirillrakhman's simple suggestion of calling
System.exit
works for now
g

gildor

06/22/2019, 5:17 AM
Anyway, I don't think that it is somehow related to coroutines, you can check the same code with Retrofit and Call API
j

joshr

06/22/2019, 3:39 PM
i tried without coroutines (just the
Call<Foo>
without suspend) and it didn't happen
i also tried with just a plain old okhttp client and it didn't happen
but, admittedly, not a lot of science in my attempts
5 Views