From 7f4921d2395bf3ee6764a7799c883d566863667f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 13 Nov 2014 13:54:04 +0100 Subject: Task._step() now calls directly create_task() Call lop.create_task() instead of using the helper function async(). --- trollius/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trollius/tasks.py b/trollius/tasks.py index ab5c226..892bb7c 100644 --- a/trollius/tasks.py +++ b/trollius/tasks.py @@ -284,7 +284,9 @@ class Task(futures.Future): result = result.obj if iscoroutine(result): - result = async(result, loop=self._loop) + # "yield coroutine" creates a task, the current task + # will wait until the new task is done + result = self._loop.create_task(result) # FIXME: faster check. common base class? hasattr? elif isinstance(result, (Lock, Condition, Semaphore)): coro = _lock_coroutine(result) -- cgit v1.2.1