Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
03f6c11f
Commit
03f6c11f
authored
Nov 27, 2009
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #7403: Fixed possible race condition in lock creation.
parent
608eb2d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
Lib/logging/__init__.py
Lib/logging/__init__.py
+5
-4
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/logging/__init__.py
View file @
03f6c11f
...
...
@@ -199,7 +199,11 @@ def _checkLevel(level):
#the lock would already have been acquired - so we need an RLock.
#The same argument applies to Loggers and Manager.loggerDict.
#
_lock
=
None
if
thread
:
_lock
=
threading
.
RLock
()
else
:
_lock
=
None
def
_acquireLock
():
"""
...
...
@@ -207,9 +211,6 @@ def _acquireLock():
This should be released with _releaseLock().
"""
global
_lock
if
(
not
_lock
)
and
thread
:
_lock
=
threading
.
RLock
()
if
_lock
:
_lock
.
acquire
()
...
...
Misc/NEWS
View file @
03f6c11f
...
...
@@ -140,6 +140,8 @@ C-API
Library
-------
- Issue #7403: logging: Fixed possible race condition in lock creation.
- Issue #6845: Add restart support for binary upload in ftplib. The
`storbinary()` method of FTP and FTP_TLS objects gains an optional `rest`
argument. Patch by Pablo Mouzo.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment