Kotlin Coroutines Tutorial, Part 2: Cooperative Scheduling, Cancellation, Coroutine Context

Описание к видео Kotlin Coroutines Tutorial, Part 2: Cooperative Scheduling, Cancellation, Coroutine Context

Written form: https://blog.rockthejvm.com/kotlin-co...
Complete Kotlin course: https://rockthejvm.com/p/kotlin-essen...

In this part 2 video of the Kotlin coroutines tutorial, we will talk about how coroutines are scheduled cooperatively compared to normal JVM threads (scheduled preemptively). We will see how adding yielding points allow coroutines to leave space for other coroutines to run on a limited thread pool. We'll also demonstrate Kotlin coroutine cancellation, how it propagates to child coroutines, safely releasing resources on completion/cancellation, and other gotchas. Finally we discuss coroutine context and properties you can pass while launching Kotlin coroutines.

Contents:
0:00 Intro, recap part 1
2:35 cooperative scheduling
11:52 cancellation
24:38 coroutines context

Follow Rock the JVM on:
LinkedIn:   / rockthejvm  
Twitter:   / rockthejvm  
Blog: https://blog.rockthejvm.com
Website: https://rockthejvm.com

Комментарии

Информация по комментариям в разработке