|
|
|
|
|
by MaxBarraclough
2063 days ago
|
|
> The concepts of threads and concurrent data access is simple enough for any decent programmer to comprehend. There is no hell here. It's notoriously difficult to reason about concurrent programs using intuition. Much more difficult than reasoning about non-concurrent imperative code. This is why there are articles like [0], and why a bug in a Wikipedia article on a fundamental concurrency algorithm went unnoticed until an analysis tool detected the issue, [1] and why lock-free algorithms in particular are so tricky to get right. [0] https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedL... [1] [PDF] https://llvm.org/pubs/2008-08-SPIN-Pancam.pdf |
|
if i had no idea about C10K problem, success of Nginx, Redis, other concurrency success stories on Actors, CSP concept, Concurrency via messages over shared memory, I would say threads are ok when you can use it. But indeed it is so simple and tempting people to design shitty software. Software is a very welcoming medium for it. it is hell.