coroutines-cancellation-exceptions

Community

Master coroutine cancellation and exceptions.

AuthorClankerGuru
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Coroutines cancellation and exception handling are easy to mishandle, leading to leaked work, stuck jobs, or silent cancellation.

Core Features & Use Cases

  • Enforces safe cancellation patterns in suspend functions using runCatching and currentCoroutineContext().ensureActive() to rethrow CancellationException.
  • Supports structured concurrency decisions, whether to use supervisorScope, and how to propagate failures without killing siblings.
  • Guides proper cleanup using NonCancellable regions to perform suspending operations after cancellation.

Quick Start

Apply the coroutine cancellation guidelines by wrapping suspending work in runCatching and ensuring active state in failure handlers.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: coroutines-cancellation-exceptions
Download link: https://github.com/ClankerGuru/opsx/archive/main.zip#coroutines-cancellation-exceptions

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.