mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
Added lock acquisition around handler removal from logger
This commit is contained in:
parent
9bda1d6f64
commit
116f16e4ab
1 changed files with 5 additions and 1 deletions
|
|
@ -1090,7 +1090,11 @@ class Logger(Filterer):
|
||||||
"""
|
"""
|
||||||
if hdlr in self.handlers:
|
if hdlr in self.handlers:
|
||||||
#hdlr.close()
|
#hdlr.close()
|
||||||
|
hdlr.acquire()
|
||||||
|
try:
|
||||||
self.handlers.remove(hdlr)
|
self.handlers.remove(hdlr)
|
||||||
|
finally:
|
||||||
|
hdlr.release()
|
||||||
|
|
||||||
def callHandlers(self, record):
|
def callHandlers(self, record):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue