File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,10 +174,6 @@ cdef inline object multibyte_rstrip(bytes bytecode):
174174 return (unpadded, npad)
175175
176176
177- cdef inline int is_main_thread():
178- return < int > (threading.current_thread() == threading.main_thread())
179-
180-
181177cdef inline object get_current_callback(int event_id):
182178 """
183179 Note:
@@ -336,8 +332,6 @@ cdef class _SysMonitoringState:
336332 # - Since our callbacks are registered globally for events,
337333 # there is no risk of events being disrupted by the wrapped
338334 # callback's returning `sys.monitoring.DISABLE`
339- if not is_main_thread():
340- return
341335 mon = sys.monitoring
342336
343337 # Set prior state
@@ -363,8 +357,6 @@ cdef class _SysMonitoringState:
363357 mon.PROFILER_ID, event_id, callback)
364358
365359 cpdef deregister(self ):
366- if not is_main_thread():
367- return
368360 mon = sys.monitoring
369361 cdef dict wrapped_callbacks = self .callbacks
370362
You can’t perform that action at this time.
0 commit comments