Debian Codegraph @

src/trio/_core/_run_context.py

raw
1 from __future__ import annotations
2
3 import threading
4 from typing import TYPE_CHECKING, Final
5
6 if TYPE_CHECKING:
7 from ._run import Runner, Task
8
9
10 class RunContext(threading.local):
11 runner: Runner
12 task: Task
13
14
15 GLOBAL_RUN_CONTEXT: Final = RunContext()