Skip to content

Glossary: Kotlin Beyond the Basics

ensureActive

Also written: isActive

Ways a coroutine checks for cancellation: `isActive` is true until canceled, and `ensureActive()` throws `CancellationException` once canceled.

Where the book teaches it

Related terms

cooperativecancellation