mirror of
https://github.com/python/cpython.git
synced 2025-10-18 04:38:07 +00:00
This commit is contained in:
parent
55c4f4c30b
commit
d3c82b9cce
6 changed files with 118 additions and 118 deletions
|
@ -29,11 +29,20 @@ PyAPI_FUNC(int) PyContext_Exit(PyObject *);
|
|||
|
||||
typedef enum {
|
||||
/*
|
||||
* The current context has switched to a different context. The object
|
||||
* passed to the watch callback is the now-current contextvars.Context
|
||||
* object, or None if no context is current.
|
||||
* A context has been entered, causing the "current context" to switch to
|
||||
* it. The object passed to the watch callback is the now-current
|
||||
* contextvars.Context object. Each enter event will eventually have a
|
||||
* corresponding exit event for the same context object after any
|
||||
* subsequently entered contexts have themselves been exited.
|
||||
*/
|
||||
Py_CONTEXT_SWITCHED = 1,
|
||||
Py_CONTEXT_EVENT_ENTER,
|
||||
/*
|
||||
* A context is about to be exited, which will cause the "current context"
|
||||
* to switch back to what it was before the context was entered. The
|
||||
* object passed to the watch callback is the still-current
|
||||
* contextvars.Context object.
|
||||
*/
|
||||
Py_CONTEXT_EVENT_EXIT,
|
||||
} PyContextEvent;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue