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

spierce7

10/22/2018, 10:10 PM
In the RC it appears that
newSingleThreadContext()
has been removed. What should I be using instead?
v

Vsevolod Tolstopyatov [JB]

10/22/2018, 10:17 PM
you can use it or
asCoroutineDispatcher
s

spierce7

10/22/2018, 10:46 PM
@Vsevolod Tolstopyatov [JB] Thanks
it wasn't showing up when I tried to import which is why I oculdn't find it
v

voddan

10/23/2018, 7:19 AM
Is it idiomatic?
d

Dico

10/23/2018, 12:07 PM
The argument is that the most common use case is limiting execution to one thread at a time. Context switches can be avoided by allowing that execution to occur by any thread (from Default Dispatcher). So LimitingDispatcher (private api currently) has been introduced.
s

spierce7

10/23/2018, 6:30 PM
@Dico Can you speak to why it's private and when it will be public?