Skip to content

Commit b2c4974

Browse files
authored
Remove use of EM_PYTHON_MULTIPROCESSING environment variable. NFC (emscripten-core#19224)
This was added a fallback to pre-existing behaviour by was always intended to be temporary.
1 parent 0a3c59d commit b2c4974

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ See docs/process.md for more on how version tagging works.
2020

2121
3.1.37 (in development)
2222
-----------------------
23+
- The `EM_PYTHON_MULTIPROCESSING` environment variable no longer has any effect.
24+
This was added a temporary fallback but should no longer be needed. (#19224)
2325
- The old reverse dependency system based on `tools/deps_info.py` has been
2426
removed and the existing `__deps` entries in JS library files can now be used
2527
to express JS-to-native dependencies. As well being more precise, and

test/test_other.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12032,12 +12032,6 @@ def test_output_name_collision(self):
1203212032
self.assertExists('hello_.wasm')
1203312033
self.assertContained('hello, world!', self.run_js('hello.wasm'))
1203412034

12035-
def test_EM_PYTHON_MULTIPROCESSING(self):
12036-
with env_modify({'EM_PYTHON_MULTIPROCESSING': '1'}):
12037-
# wasm2js optimizations use multiprocessing to run multiple node
12038-
# invocations
12039-
self.run_process([EMCC, test_file('hello_world.c'), '-sWASM=0', '-O2'])
12040-
1204112035
def test_main_module_no_undefined(self):
1204212036
# Test that ERROR_ON_UNDEFINED_SYMBOLS works with MAIN_MODULE.
1204312037
self.do_runf(test_file('hello_world.c'), emcc_args=['-sMAIN_MODULE', '-sERROR_ON_UNDEFINED_SYMBOLS'])

tools/shared.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
MINIMUM_NODE_VERSION = (10, 19, 0)
5252
EXPECTED_LLVM_VERSION = 17
5353

54-
# Used only when EM_PYTHON_MULTIPROCESSING=1 env. var is set.
55-
multiprocessing_pool = None
5654
logger = logging.getLogger('shared')
5755

5856
# warning about absolute-paths is disabled by default, and not enabled by -Wall
@@ -163,17 +161,6 @@ def run_multiple_processes(commands,
163161
if env is None:
164162
env = os.environ.copy()
165163

166-
# By default, avoid using Python multiprocessing library due to a large amount
167-
# of bugs it has on Windows (#8013, #718, etc.)
168-
# Use EM_PYTHON_MULTIPROCESSING=1 environment variable to enable it. It can be
169-
# faster, but may not work on Windows.
170-
if int(os.getenv('EM_PYTHON_MULTIPROCESSING', '0')):
171-
import multiprocessing
172-
global multiprocessing_pool
173-
if not multiprocessing_pool:
174-
multiprocessing_pool = multiprocessing.Pool(processes=cap_max_workers_in_pool(get_num_cores()))
175-
return multiprocessing_pool.map(mp_run_process, [(cmd, env, route_stdout_to_temp_files_suffix) for cmd in commands], chunksize=1)
176-
177164
std_outs = []
178165

179166
# TODO: Experiment with registering a signal handler here to see if that helps with Ctrl-C locking up the command prompt

0 commit comments

Comments
 (0)