Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

lock ordering

Always taking several locks in the same agreed order, so two threads can't each hold what the other needs.

If every thread acquires locks in one global order, no cycle of waits can form, which rules out deadlock between those locks.

Loading interactive…

Examples

  • If both threads lock north before south, whichever gets north first also gets south and the other waits; locking them in opposite orders can deadlock.

Read the full section →