Android Developers
Published in

Android Developers

Illustration by Virginia Poltrack

Cancellation in coroutines

⚠️ In order to follow the rest of the article without any problems, reading and understanding Part I of the series is required.

Calling cancel

Why isn’t my coroutine work stopping?

Making your coroutine work cancellable

Checking for job’s active state

Let other work happen using yield()

Job.join vs Deferred.await cancellation

Handling cancellation side effects

suspendCancellableCoroutine and invokeOnCancellation

Articles on modern tools and resources to help you build experiences that people love, faster and easier, across every Android device.

Recommended from Medium

Integrate Alan.app with flutter

Simple Android UI for the Front-end part of Web Applications

Integrating the OTP SMS reading capability with your Selenium ~ Appium Framework

The definitive guide of Android UI Automator with Kotlin

Exploring Android apps for fun and profit

Managing State in Android

Databinding in Android

Coil Kotlin Default Image Loader for Android

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Florina Muntenescu

Florina Muntenescu

Android Developer Advocate @Google

More from Medium

MotionEvent Listeners, BiometricManager, Activity Embedding in Android and more!

Decoding Jetpack Compose — LazyColumn, Navigation Architecture, Data Model, Grid, and TabBar View

Security in Android 12 — For Developers

Kotlin Cookbook 1