Are lock objects thread safe?
No! Lock objects are not meant to be shared between threads. They are meant to be short-lived objects created on automatic storage within a code block. Any other usage is just likely to lead to errors and won’t really be of actual benefit anyway. Share Mutexes, not Locks. For more information see the rationale behind the design for lock objects.