예제 #1
0
 def __call__(self, loop, coro):
     current = Task.current_task(loop=loop)
     task = Task(coro, loop=loop)
     try:
         task._context = current._context.copy()
     except AttributeError:
         pass
     try:
         task._context_stack = current._context_stack.copy()
     except AttributeError:
         pass
     return task