DebugClients/Python/ThreadExtension.py

branch
maintenance
changeset 5948
6f958d5765f4
parent 5680
b93cb6353cc0
child 5949
22657f04f332
equal deleted inserted replaced
5937:cc296ba99a3f 5948:6f958d5765f4
289 elif (fullname == 'greenlet' and self.greenlet is False): 289 elif (fullname == 'greenlet' and self.greenlet is False):
290 # Check for greenlet.settrace 290 # Check for greenlet.settrace
291 if hasattr(module, 'settrace'): 291 if hasattr(module, 'settrace'):
292 self.greenlet = True 292 self.greenlet = True
293 DebugBase.pollTimerEnabled = False 293 DebugBase.pollTimerEnabled = False
294
295 # TODO: Implement the debugger extension for greenlets
296 294
297 # Add hook for threading.run() 295 # Add hook for threading.run()
298 elif (fullname == "threading" and self.threadingAttached is False): 296 elif (fullname == "threading" and self.threadingAttached is False):
299 self.threadingAttached = True 297 self.threadingAttached = True
300 298
328 def __init__(self, *args, **kwargs): 326 def __init__(self, *args, **kwargs):
329 # Overwrite the provided run method with our own, to 327 # Overwrite the provided run method with our own, to
330 # intercept the thread creation by threading.Thread 328 # intercept the thread creation by threading.Thread
331 self.run = lambda s=self, run=self.run: _bootstrap(s, run) 329 self.run = lambda s=self, run=self.run: _bootstrap(s, run)
332 330
333 super(ThreadWrapper, self).__init__(*args, **kwargs) 331 module.Thread.__init__(self, *args, **kwargs)
334 332
335 module.Thread = ThreadWrapper 333 module.Thread = ThreadWrapper
336 334
337 # Add hook for *.QThread 335 # Add hook for *.QThread
338 elif (fullname in ['PyQt4.QtCore', 'PyQt5.QtCore', 336 elif (fullname in ['PyQt4.QtCore', 'PyQt5.QtCore',

eric ide

mercurial