Companion
object Companion
The companion object provides utility functions for working with coroutines
Functions
Link copied to clipboard
Launches a new coroutine on the Dispatchers.Default context and executes the given block.
Link copied to clipboard
Launches a new coroutine on the Dispatchers.IO context and executes the given block.
Link copied to clipboard
Launches a new coroutine on the Dispatchers.Main context and executes the given block.
Link copied to clipboard
This uses runBlocking([Dispatchers.Default])
for non suspend functions.
Link copied to clipboard
This uses withContext([Dispatchers.Default])
for suspend functions.
Link copied to clipboard
This uses withContext(Dispatchers.IO) for suspend functions.
Link copied to clipboard
This uses withContext([Dispatchers.Main])
for suspend functions.