Don't force 'spawn' method, add explanation for workaround
This commit is contained in:
@@ -15,6 +15,10 @@ bl_info = {
|
|||||||
import logging
|
import logging
|
||||||
log = logging.getLogger(__name__)
|
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:
|
try:
|
||||||
import bpy
|
import bpy
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@@ -50,7 +54,7 @@ else:
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
mp_context = multiprocessing.get_context('spawn')
|
mp_context = multiprocessing.get_context()
|
||||||
mp_context.set_executable(bpy.app.binary_path_python)
|
mp_context.set_executable(bpy.app.binary_path_python)
|
||||||
|
|
||||||
# global list of all known packages, indexed by name
|
# global list of all known packages, indexed by name
|
||||||
|
Reference in New Issue
Block a user