mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
gh-116818: Make sys.settrace
, sys.setprofile
, and monitoring thread-safe (#116775)
Makes sys.settrace, sys.setprofile, and monitoring generally thread-safe. Mostly uses a stop-the-world approach and synchronization around the code object's _co_instrumentation_version. There may be a little bit of extra synchronization around the monitoring data that's required to be TSAN clean.
This commit is contained in:
parent
b45af00bad
commit
07525c9a85
18 changed files with 530 additions and 63 deletions
|
@ -399,6 +399,7 @@ _Py_COMP_DIAG_POP
|
|||
&(runtime)->unicode_state.ids.mutex, \
|
||||
&(runtime)->imports.extensions.mutex, \
|
||||
&(runtime)->ceval.pending_mainthread.mutex, \
|
||||
&(runtime)->ceval.sys_trace_profile_mutex, \
|
||||
&(runtime)->atexit.mutex, \
|
||||
&(runtime)->audit_hooks.mutex, \
|
||||
&(runtime)->allocators.mutex, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue