Skip to content

Concurrency practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 32 of 32

Title Difficulty
Arc: shared ownership across threads Easy
A single-producer single-consumer ring buffer Hard
A store-buffer memory-model interpreter Hard
Atomics: counters, flags and fetch_* Medium
Balanced ranges: the arithmetic before the threads Easy
Barrier: keeping workers in lock step Medium
Build a spinlock from AtomicBool and UnsafeCell Hard
Capstone: build a thread pool Hard
CAS loops: compare_exchange and fetch_update Hard
Coordinate two threads with a condition variable Hard
JoinHandle, panics and thread::Result Medium
Join two futures and keep both results Medium
Keep worker-pool results in input order Medium
Let a channel receiver finish by dropping its senders Medium
move closures: why the compiler forces your hand Easy
mpsc channels: message passing basics Easy
Mutex and MutexGuard: unlocking with RAII Easy
OnceLock: initialize shared state once Medium
park and unpark: building a blocking primitive by hand Hard
Poisoning: what a panic does to a lock Medium
Prevent deadlocks with consistent lock ordering Hard
Release a read guard before acquiring a write lock Hard
Safe parallel mutation with chunks_mut Medium
Scoped threads: borrow, do not clone Easy
Send: what it actually guarantees Medium
Share a mutable vector with Arc and Mutex Easy
static mut and the edition-2024 wall Medium
sync_channel: bounded buffers and backpressure Medium
Sync: T is Sync exactly when &T is Send Medium
Threads, spawn and join Easy
Tree traversal with indexed storage and shared locks Medium
unsafe impl Send, and the disjoint-capture trap Hard