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
8172d3dd
Commit
8172d3dd
authored
Apr 22, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make AsyncResult.wait return self.value
parent
1eeac226
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
gevent/event.py
gevent/event.py
+3
-4
No files found.
gevent/event.py
View file @
8172d3dd
...
@@ -241,12 +241,10 @@ class AsyncResult(object):
...
@@ -241,12 +241,10 @@ class AsyncResult(object):
floating point number specifying a timeout for the operation in seconds
floating point number specifying a timeout for the operation in seconds
(or fractions thereof).
(or fractions thereof).
This method always returns ``None`` regardless of the reason it returns.
Return :attr:`value`.
To find out out what happened, use :meth:`ready` and :meth:`successful` methods
or :attr:`value` and :attr:`exception` properties.
"""
"""
if
self
.
_exception
is
not
_NONE
:
if
self
.
_exception
is
not
_NONE
:
return
return
self
.
value
else
:
else
:
switch
=
getcurrent
().
switch
switch
=
getcurrent
().
switch
self
.
rawlink
(
switch
)
self
.
rawlink
(
switch
)
...
@@ -266,6 +264,7 @@ class AsyncResult(object):
...
@@ -266,6 +264,7 @@ class AsyncResult(object):
raise
raise
# not calling unlink() in non-exception case, because if switch()
# not calling unlink() in non-exception case, because if switch()
# finished normally, link was already removed in _notify_links
# finished normally, link was already removed in _notify_links
return
self
.
value
def
_notify_links
(
self
):
def
_notify_links
(
self
):
try
:
try
:
...
...
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