Quantcast
Channel: Active questions tagged java - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 80

In Java's Fork/Join is the operation for combining results limited to addition?

$
0
0

As I understand it, the join() method merge/composes/combines the results from all subtasks. A simple example I saw was summing the numbers from 1 to N and the subtasks would simply sum a range of such numbers -- obtaining the final result very naturally involved summing each subtask's result to indeed get the right answers.

However, what if the results could not be combined via simple addition? Is there a way of specifying both a custom class for a result and a custom method of merging these results?


Viewing all articles
Browse latest Browse all 80

Latest Images

Trending Articles





Latest Images