34 for moduleName in ("thread", "_thread", "threading"): |
34 for moduleName in ("thread", "_thread", "threading"): |
35 if moduleName in sys.modules: |
35 if moduleName in sys.modules: |
36 del sys.modules[moduleName] |
36 del sys.modules[moduleName] |
37 |
37 |
38 self.__modulesToPatch = ( |
38 self.__modulesToPatch = ( |
39 'thread', '_thread', 'threading', |
39 '_thread', 'threading', |
40 'greenlet', |
40 'greenlet', |
41 'subprocess', |
41 'subprocess', |
42 'multiprocessing', |
42 'multiprocessing', |
43 'PyQt5.QtCore', |
43 'PyQt5.QtCore', |
44 'PyQt6.QtCore', |
44 'PyQt6.QtCore', |
60 module = importlib.import_module(fullname) |
60 module = importlib.import_module(fullname) |
61 sys.modules[fullname] = module |
61 sys.modules[fullname] = module |
62 |
62 |
63 ## Add hook for _thread.start_new_thread |
63 ## Add hook for _thread.start_new_thread |
64 if ( |
64 if ( |
65 fullname in ('thread', '_thread') and |
65 fullname == '_thread' and |
66 not hasattr(module, 'eric7_patched') |
66 not hasattr(module, 'eric7_patched') |
67 ): |
67 ): |
68 module.eric7_patched = True |
68 module.eric7_patched = True |
69 self.__dbgClient.patchPyThread(module) |
69 self.__dbgClient.patchPyThread(module) |
70 |
70 |