Wed, 21 Sep 2022 17:08:29 +0200
Changed the multiprocessing start method to 'spawn' because 'fork' (on *nix) seems to be unreliable with respect to queues.
diff -r 52990830b13f -r f61d71d95cb1 src/eric7/CodeFormatting/BlackFormattingDialog.py --- a/src/eric7/CodeFormatting/BlackFormattingDialog.py Wed Sep 21 10:38:52 2022 +0200 +++ b/src/eric7/CodeFormatting/BlackFormattingDialog.py Wed Sep 21 17:08:29 2022 +0200 @@ -345,15 +345,11 @@ taskQueue.put("STOP") for worker in workers: - worker.join(2) # 2 seconds timeout just in case - # TODO: monitor this change - if worker.exitcode is None: - worker.terminate() + worker.join() worker.close() taskQueue.close() - ## doneQueue.close() - # TODO: monitor this change + doneQueue.close() self.__finish()
diff -r 52990830b13f -r f61d71d95cb1 src/eric7/Utilities/BackgroundClient.py --- a/src/eric7/Utilities/BackgroundClient.py Wed Sep 21 10:38:52 2022 +0200 +++ b/src/eric7/Utilities/BackgroundClient.py Wed Sep 21 17:08:29 2022 +0200 @@ -9,14 +9,15 @@ checkers and other python interpreter dependent functions. """ +import contextlib import io import json +import multiprocessing import socket import struct import sys import time import traceback -import contextlib from zlib import adler32 @@ -234,6 +235,8 @@ ) sys.exit(1) + multiprocessing.set_start_method("spawn") + host, port, maxProcs, pyLibraryPath = sys.argv[1:] # insert pyLibraryPath into the search path because external stuff might
diff -r 52990830b13f -r f61d71d95cb1 src/eric7/eric7.py --- a/src/eric7/eric7.py Wed Sep 21 10:38:52 2022 +0200 +++ b/src/eric7/eric7.py Wed Sep 21 17:08:29 2022 +0200 @@ -14,6 +14,7 @@ import contextlib import io import logging +import multiprocessing import os import sys import traceback @@ -238,6 +239,7 @@ global app, args, mainWindow, splash, restartArgs, inMainLoop sys.excepthook = excepthook + multiprocessing.set_start_method("spawn") from PyQt6.QtGui import QGuiApplication