mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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:
|
||||
#hdlr.close()
|
||||
self.handlers.remove(hdlr)
|
||||
hdlr.acquire()
|
||||
try:
|
||||
self.handlers.remove(hdlr)
|
||||
finally:
|
||||
hdlr.release()
|
||||
|
||||
def callHandlers(self, record):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue