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

Kulwinder Singh

02/23/2019, 10:45 AM
launching
coroutine
takes more than 700+
millis
. is it normal ? ,does
launch
builder takes that much of time?,i'm using this in android while displaying splash screen and then after 3 seconds delay closing splash
l

louiscad

02/23/2019, 10:48 AM
Showing a splash screen for 3 seconds… not a UX I'd enjoy. Anyway, see this issue: https://github.com/Kotlin/kotlinx.coroutines/issues/878 and my solution is on the bottom of this page: https://github.com/LouisCAD/Splitties/tree/61e9f223219f0c1c894be77c334d826413ed720c/lifecycle-coroutines
👍 2
k

Kulwinder Singh

02/23/2019, 10:54 AM
@louiscad thanks , i will check it
a

altavir

02/23/2019, 7:23 PM
By the way, there is an issue in the tracker about multiplatform service loaders and using objects in service loaders, so it will be probably needed anyway.
l

louiscad

02/23/2019, 10:58 PM
@altavir Do you have the link? Didn't find it on YouTrack.
a

altavir

02/24/2019, 5:59 AM
This one I remember (it is mine): https://youtrack.jetbrains.com/issue/KT-25892
👍 1
I remember some discussion about multiplatform ServiceLoader, but can't find it.
k

Kulwinder Singh

03/09/2019, 9:51 AM
@louiscad can you please tell me how i should use your slution, actually i don't understood how to apply your solution
l

louiscad

03/09/2019, 10:35 AM
@Kulwinder Singh It's a library, you need to add the dependency and use
Dispatchers.MainAndroid
in place of
Dispatchers.Main
.
k

Kulwinder Singh

03/09/2019, 11:28 AM
ok, thanks👍
2 Views