Rechee Jozil
06/11/2020, 6:17 PMoctylFractal
06/11/2020, 6:19 PMyield()
Rechee Jozil
06/11/2020, 6:23 PMDominaezzz
06/11/2020, 6:29 PMRechee Jozil
06/11/2020, 6:32 PMprivate suspend fun testSuspendFunction() =
withContext(Executors.newSingleThreadExecutor().asCoroutineDispatcher()) {
Unit
}
I'll probably end up going with this for my use case^jw
06/11/2020, 6:41 PMRechee Jozil
06/11/2020, 6:42 PM* If the coroutine dispatcher is [Unconfined][Dispatchers.Unconfined], this
* functions suspends only when there are other unconfined coroutines working and forming an event-loop.
* For other dispatchers, this function calls [CoroutineDispatcher.dispatch] and
* always suspends to be resumed later regardless of the result of [CoroutineDispatcher.isDispatchNeeded].
* If there is no [CoroutineDispatcher] in the context, it does not suspend.
jw
06/11/2020, 6:42 PMRechee Jozil
06/11/2020, 6:44 PM