Lock-ordering
Discipline of acquiring all locks in the same global order everywhere to prevent circular deadlock.
A classic deadlock cause: two threads acquire the same two locks in opposite order — thread A takes lock 1 then 2, thread B takes lock 2 then 1, both wait. Lock-ordering fixes this by establishing a global total order (e.g., always lock the A-object before the B-object). If every thread acquires locks in this order, circular dependencies become impossible.
The rule requires discipline but is straightforward. Many code review checklists and static analyzers can spot ordering violations. When total order is impractical, deadlock detection or timeout is needed.