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

Method set_thread

pydevd_attach_to_process/winappdbg/window.py:233–249  ·  view source on GitHub ↗

Manually set the thread process. Use with care! @type thread: L{Thread} @param thread: (Optional) Thread object. Use C{None} to autodetect.

(self, thread=None)

Source from the content-addressed store, hash-verified

231 return self.__thread
232
233 def set_thread(self, thread=None):
234 """
235 Manually set the thread process. Use with care!
236
237 @type thread: L{Thread}
238 @param thread: (Optional) Thread object. Use C{None} to autodetect.
239 """
240 if thread is None:
241 self.__thread = None
242 else:
243 self.__load_Thread_class()
244 if not isinstance(thread, Thread):
245 msg = "Parent thread must be a Thread instance, "
246 msg += "got %s instead" % type(thread)
247 raise TypeError(msg)
248 self.dwThreadId = thread.get_tid()
249 self.__thread = thread
250
251 def __get_window(self, hWnd):
252 """

Callers 2

__init__Method · 0.95
__get_windowMethod · 0.95

Calls 2

__load_Thread_classMethod · 0.95
get_tidMethod · 0.45

Tested by

no test coverage detected