sealed class HandlerDispatcher : MainCoroutineDispatcher, Delay

Dispatches execution onto Android Handler.

This class provides type-safety and a point for future extensions.


Link copied to clipboard
abstract override val immediate: HandlerDispatcher

Returns dispatcher that executes coroutines immediately when it is already in the right context (current looper is the same as this handler's looper) without an additional re-dispatch. This dispatcher does not use Handler.post when current looper is the same as looper of the handler.