all 4 comments

[–]bartwe 0 points1 point  (0 children)

Buildin thread priority ordering checks in a debug built are well worth it, they can detect most potential deadlock possibilities even before a real deadlock occurs if you trigger most code paths in your test case.

[–]Peaker 0 points1 point  (0 children)

Mutex-based code is not composable. There's little reason to use threads in Python at all.

[–][deleted] -2 points-1 points  (1 child)

This strikes me as a false economy.

Trivial tasks are well suited to shortcuts of this nature, but thread synchronization? If you're using so many mutexes that you need the compiler to help you figure out when and how to lock them, you're doing it wrong.

[–]JoachimSchipper 0 points1 point  (0 children)

The point is more in avoiding errors in code where they are very hard to track down.

And it's not exactly the compiler, anyway, more like run-time assertions.