mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #9947: logging: backported locking fix from py3k.
This commit is contained in:
parent
3ab905f17b
commit
805ddaa3da
1 changed files with 7 additions and 5 deletions
|
@ -19,7 +19,7 @@ Configuration functions for the logging package for Python. The core package
|
||||||
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
|
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
|
||||||
by Apache's log4j system.
|
by Apache's log4j system.
|
||||||
|
|
||||||
Copyright (C) 2001-2008 Vinay Sajip. All Rights Reserved.
|
Copyright (C) 2001-2010 Vinay Sajip. All Rights Reserved.
|
||||||
|
|
||||||
To use, simply 'import logging' and log away!
|
To use, simply 'import logging' and log away!
|
||||||
"""
|
"""
|
||||||
|
@ -370,8 +370,10 @@ def stopListening():
|
||||||
Stop the listening server which was created with a call to listen().
|
Stop the listening server which was created with a call to listen().
|
||||||
"""
|
"""
|
||||||
global _listener
|
global _listener
|
||||||
if _listener:
|
logging._acquireLock()
|
||||||
logging._acquireLock()
|
try:
|
||||||
_listener.abort = 1
|
if _listener:
|
||||||
_listener = None
|
_listener.abort = 1
|
||||||
|
_listener = None
|
||||||
|
finally:
|
||||||
logging._releaseLock()
|
logging._releaseLock()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue