r/programming • • Nov 01 '17

What every systems programmer should know about lockless concurrency (PDF)

https://assets.bitbashing.io/papers/lockless.pdf
399 Upvotes

73 comments sorted by

View all comments

Show parent comments

10

u/quicknir Nov 01 '17

I mean lockless concurrency is such a hard topic, that even all the experts basically start all their talks with: if you don't need this, don't do it. If you think you need it: think again, use a mutex, and benchmark. These are people with 10+ years of experience. Reading Anthony's book takes less than a month if you're reasonably diligent about it (especially for a first pass, and especially if you can skip certain parts that are more specific).

I think this PDF is good as background knowledge, and to give people a sense of the whole world of lockless programming if they're new to it, and hopefully make it clear how much they don't know. But, the idea of someone writing lockless code professionally based only on this PDF, or more generally trying to write such code without being willing to read one book, cover to cover... This is how codebases with piles of inscrutable race conditions are born.

2

u/bubuopapa Nov 02 '17

Yes, concurrency is definitely not a topic for noobs, and "go read 500 pages" should be the very minimum you tell somenone who wants to learn about it. Same as security, you just dont tell someone, who wants to learn to make his own crypto library, to "watch 5 min youtube video".

-1

u/skulgnome Nov 02 '17

These are people with 10+ years of experience.

That's because only 10 years is just too little to know the lay of the land in any sense. Actual experience starts sometime after.

3

u/quicknir Nov 02 '17

This is just nonsense. Tons of people with < 10 years of experience are great developers, and in some cases have even made massive fundamental contributions.

A senior developer that says condescending stuff like this is usually one who's afraid to let their ideas and contributions speak for themselves.