From 0893a80c68f25982a660ff6fceab8c4254807133 Mon Sep 17 00:00:00 2001 From: Michael Scott Asato Cuthbert Date: Wed, 28 Jan 2026 12:16:00 -1000 Subject: [PATCH] fix runParallel Bug had callUpdate defined before numCPUs --- music21/common/parallel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/music21/common/parallel.py b/music21/common/parallel.py index f05ceeb46..658fd1d63 100644 --- a/music21/common/parallel.py +++ b/music21/common/parallel.py @@ -116,6 +116,7 @@ def runParallel(iterable, unpackIterable=unpackIterable, updateSendsIterable=updateSendsIterable) + numCpus = cpus() iterLength = len(iterable) totalRun = 0 if updateFunction is None: @@ -147,7 +148,6 @@ def callUpdate(ii): callUpdate(0) from joblib import Parallel, delayed # type: ignore - numCpus = cpus() with Parallel(n_jobs=numCpus) as para: delayFunction = delayed(parallelFunction) while totalRun < iterLength: