Re:Rust Atomics and Locks: Low-Level Concurrency in Practice
by estebank on Friday January 06, 2023 @01:21PM
(#34278693)
Someone has to implement those frameworks, and those people need to understand pretty much everything covered by this book :)
[ Parent
| on HN ]
Re:Rust Atomics and Locks: Low-Level Concurrency in Practice
by peoplefromibiza on Friday January 06, 2023 @01:37PM
(#34278915)
not to disagree or antagonize, but the question was
> How on earth are you doing concurrency without touching these two key primitives
and not how to write high level concurrency frameworks.
I wouldn't trust very much a concurrency framework written by someone who just learned about locks and atomics on a book.
I wouldn't even trust myself to write low level concurrent code using locks and atomics.
I have 26 years of experience as a programmer and if there's something I've learned is that low level concurrency is really hard to get right, even when you perfectly understand the underlying concepts, and it's best left to real experts that dedicated their career to it.
Re:Rust Atomics and Locks: Low-Level Concurrency in Practice
by ecnahc515 on Friday January 06, 2023 @04:42PM
(#34281604)
Sometimes all you need is an atomic counter though (or lock). Like, for the commonly used Prometheus metrics format, you usually just have global, atomic counters, because it's arguably the most efficient/easiest way to do it. Higher level primitives are nice, but even lower level APIs might be "the right choice" for even high-level problems.