Clarify when parallel tasks are actually executed in parallel
The documentation should be clarified on what parallel execution means. Coming from parallel computing I assume that parallel execution would mean that a task would run concurrent with other tasks. However parallel seems to have a different meaning in ParSeq.
The documentation have the following statement
We can use
Task.par()method to compose tasks to run in parallel
The tasks are executed concurrently if the tasks have been created as blocking tasks. They are however all executed one at a time if they are composed of callables. This can be easily seen by viewing the Graphviz Timeline of the MergeSort example. None of the parallel operations are executed concurrently.
I agree that documentation does not clarify this and it is probably most misunderstood aspect of parseq. I will provide better description on the wiki.
Thanks for bringing this up!
Jvadoc should at least mention ParSeq execution model.
Can we instead modify the behaviour of Task.par() to actually run tasks concurrently, no matter how they are created?