I am converting some Matlab codes to Scala. In Matlab, there is the matlabpool function that is used to define the number of cores to use and "open" the core for parallel computations (and thereafter use for instance parfor instead of for to run loops in parallel).
matlabpool open 4
("opens" 4 cores)
matlabpool close
("closes" the cores for parallel processing)
What is the equivalent of matlabpool in Scala?