[issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock

Kirill Smelkov report at bugs.python.org
Wed Sep 11 12:41:30 EDT 2019


Kirill Smelkov <kirr at nexedi.com> added the comment:

And it is indeed better to always do pthread_cond_signal() from under mutex.
Many pthread libraries delay the signalling to associated mutex unlock, so
there should be no performance penalty here and the correctness is much more
easier to reason about.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38106>
_______________________________________


More information about the Python-bugs-list mailing list