mirror of https://github.com/python/cpython
gh-106238: Handle KeyboardInterrupt during logging._acquireLock() (GH-106239)
Co-authored-by: Ariel Eizenberg <ariel.eizenberg@pagaya.com>
This commit is contained in:
parent
38aa89a52e
commit
99b00efd5e
|
@ -238,7 +238,11 @@ def _acquireLock():
|
|||
This should be released with _releaseLock().
|
||||
"""
|
||||
if _lock:
|
||||
_lock.acquire()
|
||||
try:
|
||||
_lock.acquire()
|
||||
except BaseException:
|
||||
_lock.release()
|
||||
raise
|
||||
|
||||
def _releaseLock():
|
||||
"""
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix rare concurrency bug in lock acquisition by the logging package.
|
Loading…
Reference in New Issue