File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -166,17 +166,17 @@ def addLevelName(level, levelName):
166
166
#the lock would already have been acquired - so we need an RLock.
167
167
#The same argument applies to Loggers and Manager.loggerDict.
168
168
#
169
- _lock = None
169
+ if thread :
170
+ _lock = threading .RLock ()
171
+ else :
172
+ _lock = None
170
173
171
174
def _acquireLock ():
172
175
"""
173
176
Acquire the module-level lock for serializing access to shared data.
174
177
175
178
This should be released with _releaseLock().
176
179
"""
177
- global _lock
178
- if (not _lock ) and thread :
179
- _lock = threading .RLock ()
180
180
if _lock :
181
181
_lock .acquire ()
182
182
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ hat's New in Python 2.4.7?
9
9
10
10
*Release date: XX-XXX-2009*
11
11
12
+ Library
13
+ -------
14
+
15
+ - Issue #7403: logging: Fixed possible race condition in lock creation.
16
+
12
17
13
18
What's New in Python 2.4.6?
14
19
===========================
You can’t perform that action at this time.
0 commit comments