Dispatchers

Слайд 2

Dispatchers

A dispatcher determines which thread or thread pool the coroutine runs on

Dispatchers A dispatcher determines which thread or thread pool the coroutine runs on

Слайд 3

Dispatchers

A dispatcher determines which thread or thread pool the coroutine runs on
Different

Dispatchers A dispatcher determines which thread or thread pool the coroutine runs
dispatchers are available depending on the task specificity

Слайд 4

Dispatchers

A dispatcher determines which thread or thread pool the coroutine runs on
Different

Dispatchers A dispatcher determines which thread or thread pool the coroutine runs
dispatchers are available depending on the task specificity

launch(Dispatchers.Default) {
// do some CPU intensive processing task here
}

Слайд 5

Dispatchers

Common dispatchers:
Main Main thread update in UI driven applications (e.g. Android) Main dispatcher needs

Dispatchers Common dispatchers: Main Main thread update in UI driven applications (e.g.
to be defined in Gradle

Слайд 6

Dispatchers

Common dispatchers:
Main Main thread update in UI driven applications (e.g. Android) Main dispatcher needs

Dispatchers Common dispatchers: Main Main thread update in UI driven applications (e.g.
to be defined in Gradle
Default Useful for CPU intensive work

Слайд 7

Dispatchers

Common dispatchers:
Main Main thread update in UI driven applications (e.g. Android) Main dispatcher needs

Dispatchers Common dispatchers: Main Main thread update in UI driven applications (e.g.
to be defined in Gradle
Default Useful for CPU intensive work
IO Useful for network communication or reading/writing files

Слайд 8

Dispatchers

Common dispatchers:
Main Main thread update in UI driven applications (e.g. Android) Main dispatcher needs

Dispatchers Common dispatchers: Main Main thread update in UI driven applications (e.g.
to be defined in Gradle
Default Useful for CPU intensive work
IO Useful for network communication or reading/writing files
Unconfined Starts the coroutine in the inherited dispatcher that called it
Имя файла: Dispatchers.pptx
Количество просмотров: 19
Количество скачиваний: 0