File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed
Filter options
Expand file tree Collapse file tree 4 files changed +13
-1
lines changed
Original file line number Diff line number Diff line change @@ -388,6 +388,14 @@ def f():
388
388
b .wait_for_finished ()
389
389
self .assertEqual (results , [True ] * N )
390
390
391
+ def test_reset_internal_locks (self ):
392
+ evt = self .eventtype ()
393
+ old_lock = evt ._cond ._lock
394
+ evt ._reset_internal_locks ()
395
+ new_lock = evt ._cond ._lock
396
+ self .assertIsNot (new_lock , old_lock )
397
+ self .assertIs (type (new_lock ), type (old_lock ))
398
+
391
399
392
400
class ConditionTests (BaseTestCase ):
393
401
"""
Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ def __init__(self):
496
496
497
497
def _reset_internal_locks (self ):
498
498
# private! called by Thread._reset_internal_locks by _after_fork()
499
- self ._cond .__init__ ()
499
+ self ._cond .__init__ (Lock () )
500
500
501
501
def is_set (self ):
502
502
"""Return true if and only if the internal flag is true."""
Original file line number Diff line number Diff line change @@ -1315,6 +1315,7 @@ Ryan Smith-Roberts
1315
1315
Rafal Smotrzyk
1316
1316
Eric Snow
1317
1317
Dirk Soede
1318
+ Nir Soffer
1318
1319
Paul Sokolovsky
1319
1320
Evgeny Sologubov
1320
1321
Cody Somerville
Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ Library
100
100
submit a coroutine to a loop from another thread, returning a
101
101
concurrent.futures.Future. By Vincent Michel.
102
102
103
+ - Issue #25319: When threading.Event is reinitialized, the underlying condition
104
+ should use a regular lock rather than a recursive lock.
105
+
103
106
- Issue #25232: Fix CGIRequestHandler to split the query from the URL at the
104
107
first question mark (?) rather than the last. Patch from Xiang Zhang.
105
108
You can’t perform that action at this time.
0 commit comments