This commit is contained in:
Raymond Hettinger 2016-09-09 15:58:00 -07:00
commit f1024f7425
7 changed files with 96 additions and 19 deletions

View file

@ -414,7 +414,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