AppDispatchers

Enum class representing different coroutine dispatchers for the application. Each enum constant encapsulates a CoroutineDispatcher and a corresponding CoroutineScope.

See also

Entries

Link copied to clipboard

Represents the default dispatcher, suitable for CPU-intensive tasks.

Link copied to clipboard

Represents the IO dispatcher, optimized for disk and network operations.

Link copied to clipboard

Represents the Main dispatcher, used for UI-related operations.

Types

Link copied to clipboard
object Companion

The companion object provides utility functions for working with coroutines

Properties

Link copied to clipboard
val dispatcher: CoroutineDispatcher

The underlying CoroutineDispatcher for this dispatcher type.

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val scope: CoroutineScope

A CoroutineScope associated with this dispatcher, using a SupervisorJob.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.