https://kotlinlang.org logo
Title
k

kpgalligan

04/30/2020, 1:02 PM
I don’t know. I think we’ve been 100% focused on trying to work around the ios issue. I would start with the android side should probably just be a pass-through. I don’t think it needs to have a child context. I was doing that for symmetry, but the native side is already pretty hacky.
p

phldavies

04/30/2020, 1:09 PM
I’ve switched to expect/actual on
network
and removed the
withContext
wrapper - seems to work fine
👍 1
I could remove the
coroutineScope
too and just leave the MainThread guard in place - will the
coroutineScope
have any impact on cancellation?
k

kpgalligan

04/30/2020, 1:15 PM
I don’t know what that’s doing. I think we’ll have to wait for @russhwolf to comment…
👉 1
🚌 1
r

russhwolf

04/30/2020, 1:17 PM
The
coroutineScope
was to try and play nice with typical coroutine semantics if you wanted to add a launch internally or something. But realistically that probably just makes it easier to do something that won't work.
p

phldavies

04/30/2020, 2:48 PM
alright so if I understand correctly leaving
coroutineScope
in the
network
function on Android would at least keep the coroutine semantics better aligned between the two and doesn’t exhibit the deadlock I was seeing on Android with both the
coroutineScope
and the
withContext(childContext())