coder-rust-async-concurrency

<skill_overview> Write correct, deadlock-free concurrent Rust code

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "coder-rust-async-concurrency" with this command: npx skills add ozerohax/assistagents/ozerohax-assistagents-coder-rust-async-concurrency

<skill_overview> Write correct, deadlock-free concurrent Rust code

Spawning threads or tasks Sharing state across threads Using channels for message passing Writing async/await code

The Rust Book - Concurrency The Rust Book - Async/Await

</skill_overview> <message_passing>

Prefer channels to avoid shared mutable state Move ownership through channels to enforce safety

use std::sync::mpsc;

let (tx, rx) = mpsc::channel(); tx.send(42).unwrap(); let value = rx.recv().unwrap();

</message_passing> <shared_state>

Use Arc<Mutex<T>> or Arc<RwLock<T>> for shared mutable state Keep lock scopes minimal and consistent Handle poison errors explicitly

</shared_state> <send_sync>

Use types that implement Send and Sync across threads Avoid Rc and RefCell in multi-threaded code

</send_sync> <async_guidelines>

Use async/await for I/O-bound work Do not block inside async functions Async code still needs an executor to run

</async_guidelines>

Lock in a consistent order Drop guards before calling into other code

<anti_patterns> Using Rc<T> across threads Holding a lock across long operations Blocking I/O inside async code </anti_patterns>

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

coder-csharp-aspnetcore-api

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-rust-axum-api

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-csharp-error-handling

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-csharp-efcore-queries

No summary provided by upstream source.

Repository SourceNeeds Review