Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
e783f8de
Commit
e783f8de
authored
Oct 21, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gevent.wait(): fix leak of a timer
- test__greenlet.py: add TestJoinAll0
parent
e9ef480b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
gevent/hub.py
gevent/hub.py
+4
-1
greentest/test__greenlet.py
greentest/test__greenlet.py
+8
-0
No files found.
gevent/hub.py
View file @
e783f8de
...
...
@@ -618,7 +618,8 @@ def iwait(objects, timeout=None):
waiter
=
Waiter
()
switch
=
waiter
.
switch
if
timeout
is
not
None
:
get_hub
().
loop
.
timer
(
timeout
,
priority
=-
1
,
ref
=
False
).
start
(
waiter
.
switch
,
_NONE
)
timer
=
get_hub
().
loop
.
timer
(
timeout
,
priority
=-
1
)
timer
.
start
(
waiter
.
switch
,
_NONE
)
try
:
count
=
len
(
objects
)
for
obj
in
objects
:
...
...
@@ -630,6 +631,8 @@ def iwait(objects, timeout=None):
return
yield
item
finally
:
if
timeout
is
not
None
:
timer
.
stop
()
for
obj
in
objects
:
obj
.
unlink
(
switch
)
...
...
greentest/test__greenlet.py
View file @
e783f8de
...
...
@@ -433,6 +433,14 @@ class TestGet(greentest.GenericGetTestCase):
g
.
kill
()
class
TestJoinAll0
(
greentest
.
GenericWaitTestCase
):
g
=
gevent
.
Greenlet
()
def
wait
(
self
,
timeout
):
gevent
.
joinall
([
self
.
g
],
timeout
=
timeout
)
class
TestJoinAll
(
greentest
.
GenericWaitTestCase
):
def
wait
(
self
,
timeout
):
...
...
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