DispatcherProvider
Interface corresponding to the different CoroutineDispatcher's offered by Dispatchers.
Implements the CoroutineContext.Element interface so that it can be embedded into the CoroutineContext map, meaning that a CoroutineContext
can be composed with a set of pre-set dispatchers, thereby eliminating the need for singleton references or dependency injecting this interface.
Types
Link copied to clipboard
Unique Key definition which allows the DispatcherProvider
to be stored in the CoroutineContext.
Functions
Link copied to clipboard
open fun copy(default: CoroutineDispatcher = this.default, io: CoroutineDispatcher = this.io, main: CoroutineDispatcher = this.main, mainImmediate: CoroutineDispatcher = this.mainImmediate, unconfined: CoroutineDispatcher = this.unconfined): DispatcherProvider
Content copied to clipboard
Link copied to clipboard
open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Content copied to clipboard
Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Content copied to clipboard
Link copied to clipboard
Properties
Link copied to clipboard
This unique Key property is what allows the DispatcherProvider
to be stored in the CoroutineContext.