forked from python-trio/trio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
if the current_task().coro.cr_frame is in the stack ki_protection_ena…
…bled is current_task()._ki_protected
- Loading branch information
Showing
3 changed files
with
32 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from __future__ import annotations | ||
|
||
import threading | ||
from typing import TYPE_CHECKING, Final | ||
|
||
if TYPE_CHECKING: | ||
from ._run import Runner, Task | ||
|
||
|
||
class RunContext(threading.local): | ||
runner: Runner | ||
task: Task | ||
|
||
|
||
GLOBAL_RUN_CONTEXT: Final = RunContext() |