withIOContext

inline suspend fun <T> withIOContext(crossinline block: suspend CoroutineScope.() -> T): T

This uses withContext(Dispatchers.IO) for suspend functions.

Parameters

block

The suspend function to run.

See also