flâneur

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