DebugClients/Python/ThreadExtension.py

branch
maintenance
changeset 5981
2f2c988c359e
parent 5949
22657f04f332
child 6004
548a9ba8c970
equal deleted inserted replaced
5980:25b57b1621f5 5981:2f2c988c359e
326 def __init__(self, *args, **kwargs): 326 def __init__(self, *args, **kwargs):
327 # Overwrite the provided run method with our own, to 327 # Overwrite the provided run method with our own, to
328 # intercept the thread creation by threading.Thread 328 # intercept the thread creation by threading.Thread
329 self.run = lambda s=self, run=self.run: _bootstrap(s, run) 329 self.run = lambda s=self, run=self.run: _bootstrap(s, run)
330 330
331 module.Thread.__init__(self, *args, **kwargs) 331 super(ThreadWrapper, self).__init__(*args, **kwargs)
332 332
333 module.Thread = ThreadWrapper 333 module.Thread = ThreadWrapper
334 334
335 # Add hook for *.QThread 335 # Add hook for *.QThread
336 elif (fullname in ['PyQt4.QtCore', 'PyQt5.QtCore', 336 elif (fullname in ['PyQt4.QtCore', 'PyQt5.QtCore',

eric ide

mercurial