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

Afzal Najam

09/10/2020, 8:10 PM
Is putting
okhttpclient.newCall(request).execute()
inside a coroutine going to cause any problems, as compared to calling
enqueue
wrapped around a
suspendCancellableCoroutine
?
g

gildor

09/10/2020, 11:35 PM
Coroutine thread will be blocked, you have to wrap to io dispatcher, cancellation will not work, standard threading limits of okhttp dispatcher will not be applied
a

Afzal Najam

09/11/2020, 1:51 AM
Thanks @gildor!! I guess I'm going to use your library then 😄