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
c379a9af
Commit
c379a9af
authored
Mar 10, 2013
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve variable names
parent
c660d32d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Lib/threading.py
Lib/threading.py
+5
-5
No files found.
Lib/threading.py
View file @
c379a9af
...
...
@@ -222,14 +222,14 @@ class Condition:
def
notify
(
self
,
n
=
1
):
if
not
self
.
_is_owned
():
raise
RuntimeError
(
"cannot notify on un-acquired lock"
)
_
_waiters
=
self
.
_waiters
waiters
=
_deque
(
_islice
(
_
_waiters
,
n
))
if
not
waiters
:
all
_waiters
=
self
.
_waiters
waiters
_to_notify
=
_deque
(
_islice
(
all
_waiters
,
n
))
if
not
waiters
_to_notify
:
return
for
waiter
in
waiters
:
for
waiter
in
waiters
_to_notify
:
waiter
.
release
()
try
:
_
_waiters
.
remove
(
waiter
)
all
_waiters
.
remove
(
waiter
)
except
ValueError
:
pass
...
...
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