Lines Matching full:task
9 def _task_repr_info(task): argument
10 info = base_futures._future_repr_info(task)
12 if task.cancelling() and not task.done():
16 info.insert(1, 'name=%r' % task.get_name())
18 coro = coroutines._format_coroutine(task._coro)
21 if task._fut_waiter is not None:
22 info.insert(3, f'wait_for={task._fut_waiter!r}')
27 def _task_repr(task): argument
28 info = ' '.join(_task_repr_info(task))
29 return f'<{task.__class__.__name__} {info}>'
32 def _task_get_stack(task, limit): argument
34 if hasattr(task._coro, 'cr_frame'):
36 f = task._coro.cr_frame
37 elif hasattr(task._coro, 'gi_frame'):
39 f = task._coro.gi_frame
40 elif hasattr(task._coro, 'ag_frame'):
42 f = task._coro.ag_frame
55 elif task._exception is not None:
56 tb = task._exception.__traceback__
67 def _task_print_stack(task, limit, file): argument
70 for f in task.get_stack(limit=limit):
81 exc = task._exception
83 print(f'No stack for {task!r}', file=file)
85 print(f'Traceback for {task!r} (most recent call last):', file=file)
87 print(f'Stack for {task!r} (most recent call last):', file=file)