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
5af72d4d
Commit
5af72d4d
authored
Jul 08, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Account for the stopped callbacks in the leakcheck.
parent
44ce117c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
gevent/greenlet.py
gevent/greenlet.py
+5
-0
greentest/greentest.py
greentest/greentest.py
+7
-0
No files found.
gevent/greenlet.py
View file @
5af72d4d
...
...
@@ -189,6 +189,11 @@ class Greenlet(greenlet):
# prevent self from ever being started in the future
self
.
_start_event
=
_cancelled_start_event
# cancel any pending start event
# NOTE: If this was a real pending start event, this will leave a
# "dangling" callback/timer object in the hub.loop.callbacks list;
# depending on where we are in the event loop, it may even be in a local
# variable copy of that list (in _run_callbacks). This isn't a problem,
# except for the leak-tests.
self
.
_start_event
.
stop
()
def
__handle_death_before_start
(
self
,
*
args
):
...
...
greentest/greentest.py
View file @
5af72d4d
...
...
@@ -28,6 +28,7 @@ import time
import
os
from
os.path
import
basename
,
splitext
import
gevent
import
gevent.core
from
patched_tests_setup
import
get_switch_expected
from
gevent.hub
import
_get_hub
from
functools
import
wraps
...
...
@@ -106,6 +107,12 @@ def wrap_refcount(method):
k
=
type
(
x
)
if
k
in
IGNORED_TYPES
:
continue
if
k
==
gevent
.
core
.
callback
and
x
.
callback
is
None
and
x
.
args
is
None
:
# these represent callbacks that have been stopped, but
# the event loop hasn't cycled around to run them. The only
# known cause of this is killing greenlets before they get a chance
# to run for the first time.
continue
d
[
k
]
+=
1
return
d
...
...
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