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
{{ message }}
Repository navigation
Add threading.gettrace and threading.getprofile #86417
When working in a C extension from a non-python created thread which calls PyGILState_Ensure as it later calls a Python callback on user code, I wished there was a way to set the trace function similar to what a native Python thread would do.
We could just call sys.gettrace within the thread, but the application might have chosen to set threading.settrace differently.
Activity
mariocj89 commentedon Nov 3, 2020
When working in a C extension from a non-python created thread which calls PyGILState_Ensure as it later calls a Python callback on user code, I wished there was a way to set the trace function similar to what a native Python thread would do.
We could just call sys.gettrace within the thread, but the application might have chosen to set threading.settrace differently.
Same applies for threading.setprofile.
pablogsal commentedon Nov 4, 2020
New changeset 0001a1b by Mario Corchero in branch 'master':
bpo-42251: Add gettrace and getprofile to threading (GH-23125)
0001a1b