Each step either succeeds or leaves the worker waiting. If both workers are waiting on each other, that is a deadlock.