!7 static Lock a = fairLock(); static Lock b = fairLock(); p-tt { centerHigherConsole(); print("Initiating deadlock... :-)\n"); thread "A" { lock a; // cool new syntax! print("Thread A has lock A."); sleep1Second(); print("Thread A getting lock B."); lock b; print("Thread A successful!"); } thread "B" { lock b ; print("Thread B has lock B."); sleep1Second(); print("Thread B getting lock A."); lock a; print("Thread B successful!"); } sleepQuietly(); }