Control over parallelism


Why doesn’t the parallel method include an int parameter to influence the amount of parallelism the developer may want to use? It seems that the API is either spiking processor usage or working on a single thread but doesn’t allow for much in between.


Sorry, which method is that? There once was a par method, but I think it’s gone.

Usually, methods that may use more than one thread take an ExecutionContext as an (often implicit) argument, and the ExecutionContext determines the amount of parallelism.

1 Like

Only in a sense. As of Scala 2.13, to use .par you have to add a dependency on scala-parallel-collections and import an implicit. Details at

And, information on configuring the parallelism is at

1 Like

P.S. Is there a reason you’re asking here and not on Is this in the context of some Scala contribution you’re working on?


A couple of relevant tickets.