DispatcherWithShutdown
class DispatcherWithShutdown : CoroutineDispatcher
Specialized dispatcher useful for graceful shutdown
Constructors
DispatcherWithShutdown(delegate: CoroutineDispatcher) Specialized dispatcher useful for graceful shutdown |
Functions
fun completeShutdown(): Unit Complete shutdown. Any further attempts to dispatch anything will fail with RejectedExecutionException |
|
fun dispatch(context: <ERROR CLASS>, block: Runnable): Unit |
|
fun isDispatchNeeded(context: <ERROR CLASS>): Boolean |
|
fun prepareShutdown(): Unit Prepare for shutdown so we will not dispatch on delegate anymore. It is still possible to dispatch coroutines. |