You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-124872: Mark the thread's default context as entered
Starting with commit 843d28f
(temporarily reverted in d3c82b9 and
restored in commit bee112a), it is
now technically possible to access a thread's default context created
by `context_get`. Mark that context as entered so that users cannot
push that context onto the thread's stack a second time, which would
cause a cycle.
This change also causes a `CONTEXT_SWITCHED` event to be emitted when
the default context is created, which might be important in some use
cases.
Also exit the default context when the thread exits, for symmetry and
in case the user wants to re-enter it for some reason.
(Even if the `CONTEXT_SWITCHED` event is removed, entering the default
context is good defensive practice, and the consistent treatment of
all contexts on the stack makes it easier to understand the code.)
0 commit comments