|
|
Arc gives you sharing, not mutability
|
Easy
|
Primitives
|
|
|
|
Arc: shared ownership across threads
|
Easy
|
Primitives
|
|
|
|
A single-producer single-consumer ring buffer
|
Hard
|
End-to-End
|
|
|
|
A store-buffer memory-model interpreter
|
Hard
|
Research
|
|
|
|
Atomics: counters, flags and fetch_*
|
Medium
|
Primitives
|
|
|
|
Balanced ranges: the arithmetic before the threads
|
Easy
|
Primitives
|
|
|
|
Barrier: keeping workers in lock step
|
Medium
|
End-to-End
|
|
|
|
Build a spinlock from AtomicBool and UnsafeCell
|
Hard
|
End-to-End
|
|
|
|
Capstone: build a thread pool
|
Hard
|
End-to-End
|
|
|
|
CAS loops: compare_exchange and fetch_update
|
Hard
|
Framework
|
|
|
|
Condvar: a wakeup is a hint, the predicate is the truth
|
Hard
|
Framework
|
|
|
|
Deadlock by lock ordering: the guarantee Rust does not give you
|
Hard
|
End-to-End
|
|
|
|
Guard lifetimes: still holding the lock, still not meaning to
|
Hard
|
Framework
|
|
|
|
Hand-rolling `join`: running two futures concurrently
|
Medium
|
Framework
|
|
|
|
Index tagging: the pattern that makes concurrency testable
|
Medium
|
Framework
|
|
|
|
JoinHandle, panics and thread::Result
|
Medium
|
Primitives
|
|
|
|
move closures: why the compiler forces your hand
|
Easy
|
Primitives
|
|
|
|
mpsc channels: message passing basics
|
Easy
|
Primitives
|
|
|
|
Mutex and MutexGuard: you cannot forget to unlock
|
Easy
|
Primitives
|
|
|
|
OnceLock: one initialisation, however many threads race for it
|
Medium
|
Primitives
|
|
|
|
park and unpark: building a blocking primitive by hand
|
Hard
|
Framework
|
|
|
|
Poisoning: what a panic does to a lock
|
Medium
|
Framework
|
|
|
|
Rc<RefCell<T>> vs Arc<Mutex<T>>, and the arena that beats both
|
Medium
|
End-to-End
|
|
|
|
Safe parallel mutation with chunks_mut
|
Medium
|
Framework
|
|
|
|
Scoped threads: borrow, do not clone
|
Easy
|
Primitives
|
|
|
|
Send: what it actually guarantees
|
Medium
|
Primitives
|
|
|
|
static mut and the edition-2024 wall
|
Medium
|
Framework
|
|
|
|
sync_channel: bounded buffers and backpressure
|
Medium
|
Framework
|
|
|
|
Sync: T is Sync exactly when &T is Send
|
Medium
|
Primitives
|
|
|
|
The drop(tx) hang: a bug with no diagnostics
|
Medium
|
Framework
|
|
|
|
Threads, spawn and join
|
Easy
|
Primitives
|
|
|
|
unsafe impl Send, and the disjoint-capture trap
|
Hard
|
Framework
|
|