mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-100227: Lock Around Adding Global Audit Hooks (gh-105515)
The risk of a race with this state is relatively low, but we play it safe anyway.
This commit is contained in:
parent
34c63b86d3
commit
e822a676f1
3 changed files with 47 additions and 21 deletions
|
@ -143,7 +143,10 @@ typedef struct pyruntimestate {
|
|||
// is called multiple times.
|
||||
Py_OpenCodeHookFunction open_code_hook;
|
||||
void *open_code_userdata;
|
||||
_Py_AuditHookEntry *audit_hook_head;
|
||||
struct {
|
||||
PyThread_type_lock mutex;
|
||||
_Py_AuditHookEntry *head;
|
||||
} audit_hooks;
|
||||
|
||||
struct _py_object_runtime_state object_state;
|
||||
struct _Py_float_runtime_state float_state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue