(loop, task)
| 951 | |
| 952 | |
| 953 | def _enter_task(loop, task): |
| 954 | current_task = _current_tasks.get(loop) |
| 955 | if current_task is not None: |
| 956 | raise RuntimeError(f"Cannot enter into task {task!r} while another " |
| 957 | f"task {current_task!r} is being executed.") |
| 958 | _current_tasks[loop] = task |
| 959 | |
| 960 | |
| 961 | def _leave_task(loop, task): |