invoke

inline suspend operator fun <T> CoroutineDispatcher.invoke(noinline block: suspend CoroutineScope.() -> T): T

Calls the specified suspending block with the given CoroutineDispatcher, suspends until it completes, and returns the result.

This inline function calls withContext.

Sources

common source
Link copied to clipboard