A somewhat similar approach is suggested here by oxinabox
: use Base.foreach
for sequential and ThreadsX.foreach
for parallel execution (and automatically switch based on the value of PARALLEL
).
@jibe Check out the linked topic: it deals with the same question and has some more answers.