6 """ |
6 """ |
7 Module implementing a background service for the various checkers and other |
7 Module implementing a background service for the various checkers and other |
8 Python interpreter dependent functions. |
8 Python interpreter dependent functions. |
9 """ |
9 """ |
10 |
10 |
|
11 import contextlib |
11 import json |
12 import json |
12 import os |
13 import os |
13 import struct |
14 import struct |
14 import sys |
15 import sys |
15 from zlib import adler32 |
16 from zlib import adler32 |
16 import contextlib |
17 |
17 |
18 from PyQt6.QtCore import QProcess, pyqtSignal, QTimer, QThread |
18 from PyQt6.QtCore import QProcess, pyqtSignal, QTimer |
|
19 from PyQt6.QtWidgets import QApplication |
19 from PyQt6.QtWidgets import QApplication |
20 from PyQt6.QtNetwork import QTcpServer, QHostAddress |
20 from PyQt6.QtNetwork import QTcpServer, QHostAddress |
21 |
21 |
22 from EricWidgets import EricMessageBox |
22 from EricWidgets import EricMessageBox |
23 from EricWidgets.EricApplication import ericApp |
23 from EricWidgets.EricApplication import ericApp |
295 return |
295 return |
296 |
296 |
297 # Don't kill a process if it's still working |
297 # Don't kill a process if it's still working |
298 if not forceKill: |
298 if not forceKill: |
299 while self.isWorking is not None: |
299 while self.isWorking is not None: |
|
300 QThread.msleep(100) |
300 QApplication.processEvents() |
301 QApplication.processEvents() |
301 |
302 |
302 conn = self.connections.pop(language, None) |
303 conn = self.connections.pop(language, None) |
303 if conn: |
304 if conn: |
304 conn.blockSignals(True) |
305 conn.blockSignals(True) |