]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-74953: Reformat PyThread_acquire_lock_timed() (#93947)
authorVictor Stinner <vstinner@python.org>
Sun, 19 Jun 2022 09:50:21 +0000 (11:50 +0200)
committerGitHub <noreply@github.com>
Sun, 19 Jun 2022 09:50:21 +0000 (11:50 +0200)
commit2664d9aacf25aa18e1753e57f80f345ed9bd31e0
tree6e976fb6478eb26a7ca695ae4331ed334ed39e82
parentdba3fa57e26c5b0f7a4bfd3228a9bc109f35b6c8
gh-74953: Reformat PyThread_acquire_lock_timed() (#93947)

Reformat the pthread implementation of PyThread_acquire_lock_timed()
using a mutex and a conditioinal variable.

* Add goto to avoid multiple indentation levels and exit quickly
* Use "while(1)" and make the control flow more obvious.
* PEP 7: Add braces around if blocks.
Python/thread_pthread.h