coroutines-shared-state

Community

Coordinate shared state across coroutines.

AuthorClankerGuru
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Coroutines can access and modify shared mutable state, leading to data races and subtle bugs. This skill provides patterns to coordinate access safely and avoid deadlocks.

Core Features & Use Cases

  • Mutex-based synchronization with withLock for short critical sections.
  • Atomic references and StateFlow-based state management for observable, lock-free reads.
  • Single-thread confinement and actor-style messaging to prevent cross-thread contention.
  • Deadlock-avoidance guidance and best practices for lock ordering.

Quick Start

Create a small Kotlin example where multiple coroutines update a shared counter safely and verify thread-safe behavior.

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-shared-state
Download link: https://github.com/ClankerGuru/opsx/archive/main.zip#coroutines-shared-state

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.