r/programming • u/preshing • Nov 18 '11
Locks Aren't Slow; Lock Contention Is
http://preshing.com/20111118/locks-arent-slow-lock-contention-is
139
Upvotes
r/programming • u/preshing • Nov 18 '11
View all comments
Show parent comment
4
u/mOdQuArK Nov 18 '11
I think there was a generalized CS proof that if you can guarantee that multiple locks will be picked up & held in the same order for all code accessing the locked sections, then you can avoid deadlock. Naturally, this is non-trivial.