&gt; Eliminating deadlocks in general isn&#x27;t possible in a Turing-complete language.<p>It is possible. For example, you could just remove threads and synchronization primitives. :)<p>But it&#x27;s not easy -- IMO, compared to data races it&#x27;s much harder to eliminate deadlocks statically without restricting expressiveness too much. It&#x27;s even harder if you count I&#x2F;O related deadlocks as deadlocks (e.g. deadlocking reads on Unix pipes).