From 85ce4c3bc7acba8bd7660a3324a13b3058680546 Mon Sep 17 00:00:00 2001 From: Ellwood Zwovic Date: Sat, 19 Aug 2017 19:05:14 -0700 Subject: [PATCH] Don't force 'spawn' method, add explanation for workaround --- package_manager/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package_manager/__init__.py b/package_manager/__init__.py index b02d2fe..3f46502 100644 --- a/package_manager/__init__.py +++ b/package_manager/__init__.py @@ -15,6 +15,10 @@ bl_info = { import logging log = logging.getLogger(__name__) +# HACK: +# due to lack of fork() on windows, multiprocessing will re-execute this module +# in a new process. In such cases we only need subproc, everything else is only +# used to spawn the subprocess in the first place. try: import bpy except ImportError: @@ -50,7 +54,7 @@ else: from pathlib import Path from collections import OrderedDict import multiprocessing - mp_context = multiprocessing.get_context('spawn') + mp_context = multiprocessing.get_context() mp_context.set_executable(bpy.app.binary_path_python) # global list of all known packages, indexed by name