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
- A half-hour to learn Rustfasterthanli.me
- References and Borrowing - The Rust Programming Languagedoc.rust-lang.org
- Patterns for Defensive Programming in Rust | corrode Rust Consultingcorrode.dev
- Rust Language Cheat Sheetcheats.rs
- (Re)writing an interpreter in Rust – Danny van Kootendannyvankooten.com
- Redux Essentials, Part 1: Redux Overview and Concepts | Reduxredux.js.org
- Async Rust Is A Bad Languagebitbashing.io
- Beating the fastest lexer generator in Rustalic.dev
- Data Race Detector - The Go Programming Languagego.dev
- Item 7: Use builders for complex types - Effective Rustlurklurk.org
- Master Hexagonal Architecture in Rusthowtocodeit.com
- What makes Rust special - Rust for C-Programmersrust-for-c-programmers.com