Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Kotlin Coroutine Cancellation - Cooperative Cancellation, Exception Handling, and Timeouts

Smartherd via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Dive into the intricacies of Kotlin Coroutine Cancellation in this comprehensive 29-minute video tutorial. Learn about cooperative coroutines and how to write cooperative code. Explore essential functions like job.cancel() and job.cancelAndJoin(), and understand the use of suspending functions such as yield() and delay(). Discover the CoroutineScope.isActive boolean flag and its significance. Master handling CancellationException and TimeoutCancellationException, and gain proficiency in using coroutine builders like withContext(NonCancellable), withTimeout, and withTimeoutOrNull. The tutorial covers various topics including cooperative cancellation, exception handling, timeouts, and provides a summary of key concepts, making it an invaluable resource for developers looking to enhance their Kotlin coroutine skills.

Syllabus

Welcome
Prerequisites
Cooperative Coroutine Cancellation
yield function
isActive flag
Handling CancellationException
withContext
Exception with message
Timeouts
Summary
What's Next? .

Taught by

Smartherd

Reviews

Start your review of Kotlin Coroutine Cancellation - Cooperative Cancellation, Exception Handling, and Timeouts

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.