parseq icon indicating copy to clipboard operation
parseq copied to clipboard

Clarify when parallel tasks are actually executed in parallel

Open pcmoen opened this issue 10 years ago • 3 comments

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.

pcmoen avatar Oct 27 '15 07:10 pcmoen

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!

jodzga avatar Oct 27 '15 15:10 jodzga

Jvadoc should at least mention ParSeq execution model.

jodzga avatar Mar 30 '17 05:03 jodzga

Can we instead modify the behaviour of Task.par() to actually run tasks concurrently, no matter how they are created?

Anmol-Singh-Jaggi avatar Oct 06 '21 03:10 Anmol-Singh-Jaggi