Enable multiprocessing freeze_support (for Windows) and enable forkserver

Since we use a thread for logging among other possibilities, we were
never able to use threads safely when forking. forkserver will do the job.
This commit is contained in:
James R. Barlow
2023-10-24 00:54:30 -07:00
parent 53c953a561
commit b9646b6f85
+4
View File
@@ -7,6 +7,7 @@
from __future__ import annotations
import logging
import multiprocessing
import os
import signal
import sys
@@ -76,4 +77,7 @@ def run(args=None):
if __name__ == '__main__':
multiprocessing.freeze_support()
if os.name == 'posix':
multiprocessing.set_start_method('forkserver')
sys.exit(run())