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
51d55283
Commit
51d55283
authored
Oct 24, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Merge heads
parents
4db97f93
35ca2ddd
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
83 deletions
+82
-83
Lib/asyncio/futures.py
Lib/asyncio/futures.py
+7
-2
Lib/test/test_asyncio/test_futures.py
Lib/test/test_asyncio/test_futures.py
+75
-81
No files found.
Lib/asyncio/futures.py
View file @
51d55283
...
...
@@ -2,7 +2,7 @@
__all__
=
[
'CancelledError'
,
'TimeoutError'
,
'InvalidStateError'
,
'Future'
,
'wrap_future'
,
'Future'
,
'wrap_future'
,
'isfuture'
]
import
concurrent.futures._base
...
...
@@ -389,6 +389,10 @@ class Future:
__await__
=
__iter__
# make compatible with 'await' expression
# Needed for testing purposes.
_PyFuture
=
Future
def
_set_result_unless_cancelled
(
fut
,
result
):
"""Helper setting the result only if the future was not cancelled."""
if
fut
.
cancelled
():
...
...
@@ -488,4 +492,5 @@ try:
except
ImportError
:
pass
else
:
Future
=
_asyncio
.
Future
# _CFuture is needed for tests.
Future
=
_CFuture
=
_asyncio
.
Future
Lib/test/test_asyncio/test_futures.py
View file @
51d55283
This diff is collapsed.
Click to expand it.
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