Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion music21/common/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def runParallel(iterable,
unpackIterable=unpackIterable,
updateSendsIterable=updateSendsIterable)

numCpus = cpus()
iterLength = len(iterable)
totalRun = 0
if updateFunction is None:
Expand Down Expand Up @@ -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:
Expand Down