Final thoughts on locking Design locking in from the beginning Code will not be correct without Can be hard to retrofit Know what you are protecting Any shared data structure Hardware resources Have clear access rules Avoid fine-grained locking Until you have no other choice