MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / ClassWithPydevStartJoinableThread

Class ClassWithPydevStartJoinableThread

_pydev_bundle/pydev_monkey.py:1210–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1208 return _original_start_new_thread(_UseNewThreadStartup(function, args, kwargs), ())
1209
1210 class ClassWithPydevStartJoinableThread:
1211 def pydev_start_joinable_thread(self, function, *args, **kwargs):
1212 """
1213 We need to replace the original thread_module._start_joinable_thread with this function so that threads started
1214 through it and not through the threading module are properly traced.
1215 """
1216 # Note: only handling the case from threading.py where the handle
1217 # and daemon flags are passed explicitly. This will fail if some user library
1218 # actually passes those without being a keyword argument!
1219 handle = kwargs.pop("handle", None)
1220 daemon = kwargs.pop("daemon", True)
1221 return _original_start_joinable_thread(_UseNewThreadStartup(function, args, kwargs), handle=handle, daemon=daemon)
1222
1223 # This is a hack for the situation where the thread_module.start_new_thread is declared inside a class, such as the one below
1224 # class F(object):

Callers 1

patch_thread_moduleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected