# TaskDispatchers

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/platform/TaskDispatchers.kt+class:androidx.compose.ui.platform.TaskDispatchers) Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.13.0-rc01) Common/AllAndroid/JVM
- Cmn

  ```
  interface TaskDispatchers
  ```

*** ** * ** ***

Interface providing access to `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html`s used for task execution inside a Compose hierarchy.

```kotlin
import androidx.compose.material3.Text
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.platform.LocalTaskDispatchers

val taskDispatchers = LocalTaskDispatchers.current
LaunchedEffect(taskDispatchers) {
    withContext(taskDispatchers.IO) {
        // Perform background I/O operations using the provided IO context
    }
}
Text("TaskDispatchers Sample")
```

## Summary

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/TaskDispatchers#Default()` A `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html` optimized for performing CPU-intensive work outside of the UI thread. | Cmn |
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/TaskDispatchers#IO()` A `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html` designed for offloading blocking I/O tasks to a shared pool of threads. | Cmn |

## Public properties

### Default

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.13.0-rc01)

```
val Default: CoroutineDispatcher
```

A `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html` optimized for performing CPU-intensive work outside of the UI thread.

### IO

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.13.0-rc01)

```
val IO: CoroutineDispatcher
```

A `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html` designed for offloading blocking I/O tasks to a shared pool of threads.