launch Synchronously
Launches a coroutine and blocks the current thread until the coroutine completes, returning its result. This is useful for bridging between suspending and non-suspending code in JVM environments. The coroutine is launched with CoroutineStart.UNDISPATCHED to start execution immediately.
Return
The result of the suspending block
Parameters
The suspending function to execute synchronously
Type Parameters
The return type of the suspending block
Throws
if the coroutine throws an exception
Launches a coroutine in a new CoroutineScope with Dispatchers.Default and blocks the current thread until the coroutine completes, returning its result.
Return
The result of the suspending block
Parameters
The suspending function to execute synchronously
Type Parameters
The return type of the suspending block
Throws
if the coroutine throws an exception