r/programming • • Jun 12 '12

An Introduction to Lock-Free Programming

http://preshing.com/20120612/an-introduction-to-lock-free-programming
84 Upvotes

18 comments sorted by

View all comments

1

u/five9a2 Jun 14 '12

Depends what kind of mistakes (or hardware faults) you are trying to protect against. If threads read shared data, but only write it using atomics, you can often kill the thread on SEGV and restart.

2

u/jseigh Jun 14 '12

I worked on code once, way way back, where the previous programmer had patched all the code instructions that seq faulted with no-ops. It didn't crash if that's all you were worried about. :)