Merge asyncio upstream.

This commit is contained in:
Guido van Rossum 2016-09-09 14:26:31 -07:00
parent 9b32bda851
commit 7b3b3dc85d
6 changed files with 94 additions and 14 deletions

View file

@ -363,7 +363,7 @@ class BaseEventLoop(events.AbstractEventLoop):
"""
self._check_closed()
new_task = not isinstance(future, futures.Future)
new_task = not futures.isfuture(future)
future = tasks.ensure_future(future, loop=self)
if new_task:
# An exception is raised if the future didn't complete, so there