]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109974: Fix more threading lock_tests race conditions (#110089)
authorVictor Stinner <vstinner@python.org>
Fri, 29 Sep 2023 12:21:18 +0000 (14:21 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Sep 2023 12:21:18 +0000 (12:21 +0000)
commit743e3572ee940a6cf88fd518e5f4a447905ba5eb
tree870c89c862bb7ccc96db199468791a96ea7f7484
parent501939c9c1433c5b95ca19ae752e5881149f61b9
gh-109974: Fix more threading lock_tests race conditions (#110089)

* Add context manager on Bunch class.
* Bunch now catchs exceptions on executed functions and re-raise them
  at __exit__() as an ExceptionGroup.
* Rewrite BarrierProxy.test_default_timeout(). Use a single thread.
  Only check that barrier.wait() blocks for at least default timeout
  seconds.
* test_with(): inline _with() function.
Lib/test/lock_tests.py
Lib/test/test_importlib/test_locks.py