From 1ab6f30fdd1dd3b84e99bfbd14018a237b8095fb Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 26 Aug 2021 18:39:59 +0200 Subject: Remove fork_context from llnl.util.lang (#25620) This object was introduced in #18124, and was later superseded by #18205 and removed any use if the object. --- lib/spack/llnl/util/lang.py | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'lib') diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py index 408648f1c1..ac431ecbaf 100644 --- a/lib/spack/llnl/util/lang.py +++ b/lib/spack/llnl/util/lang.py @@ -7,7 +7,6 @@ from __future__ import division import functools import inspect -import multiprocessing import os import re import sys @@ -31,23 +30,6 @@ else: ignore_modules = [r'^\.#', '~$'] -# On macOS, Python 3.8 multiprocessing now defaults to the 'spawn' start -# method. Spack cannot currently handle this, so force the process to start -# using the 'fork' start method. -# -# TODO: This solution is not ideal, as the 'fork' start method can lead to -# crashes of the subprocess. Figure out how to make 'spawn' work. -# -# See: -# * https://github.com/spack/spack/pull/18124 -# * https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods # noqa: E501 -# * https://bugs.python.org/issue33725 -if sys.version_info >= (3,): # novm - fork_context = multiprocessing.get_context('fork') -else: - fork_context = multiprocessing - - def index_by(objects, *funcs): """Create a hierarchy of dictionaries by splitting the supplied set of objects on unique values of the supplied functions. -- cgit v1.2.3-70-g09d2