A data race that doesn't compile | Corentin Corgié
corentin-core.github.io · 3,387 words · saved by 1 readers
How I taught Rust’s type system to refuse my own parallel-Redux data races, with one false start and one mind-shift.
How I taught Rust’s type system to refuse my own parallel-Redux data races, with one false start and one mind-shift. There’s a class of bug I’ve spent more nights chasing than I care to remember. The kind that only happens under load, vanishes when you attach a debugger, and takes three engineers a weekend to corner. Data races. Rust’s borrow checker prevents most of them at the value level. But not all of them, and definitely not the question that interested me here: can the compiler refuse to build a parallel reducer pipeline where two reducers might write to the same piece of state?…
saved by
related reading
- Rewriting Bun in Rust | Bun Blogbun.com
- A half-hour to learn Rustfasterthanli.me
- References and Borrowing - The Rust Programming Languagedoc.rust-lang.org
- Redux Essentials, Part 1: Redux Overview and Concepts | Reduxredux.js.org
- Fearless Concurrency - The Rust Programming Languagedoc.rust-lang.org
- You Might Not Need an Effect – Reactreact.dev
- Rust Language Cheat Sheetcheats.rs
- Patterns for Defensive Programming in Rust | corrode Rust Consultingcorrode.dev
- The Slice Type - The Rust Programming Languagedoc.rust-lang.org
- Towards a unified theory of reactive UI | Raph Levien’s blographlinus.github.io
- When (and when not) to reach for Reduxchangelog.com
- Reading 16: Mutual Exclusionweb.mit.edu