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
02082c9e
Commit
02082c9e
authored
Jul 14, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
greenlet.py: when dispatch() exits, raise an exception instead of returning
this avoids screwing up parent greenlet's switch()
parent
8063591d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
gevent/greenlet.py
gevent/greenlet.py
+7
-5
No files found.
gevent/greenlet.py
View file @
02082c9e
...
@@ -134,11 +134,13 @@ class Hub(object):
...
@@ -134,11 +134,13 @@ class Hub(object):
raise
raise
sys
.
stderr
.
write
(
'Restarting gevent.core.dispatch() after an error [%s]: %s
\
n
'
%
(
loop_count
,
ex
))
sys
.
stderr
.
write
(
'Restarting gevent.core.dispatch() after an error [%s]: %s
\
n
'
%
(
loop_count
,
ex
))
continue
continue
if
result
>
0
:
if
result
==
1
:
return
'Hub.run() has finished because there are no events registered'
raise
DispatchExit
(
'No events registered'
)
elif
result
<
0
:
raise
DispatchExit
(
'dispatch() exited with code %s'
%
(
result
,
))
return
'Hub.run() has finished because there was an error'
return
result
class
DispatchExit
(
Exception
):
pass
def
_wait_helper
(
ev
,
fd
,
evtype
):
def
_wait_helper
(
ev
,
fd
,
evtype
):
...
...
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