Can someone explain what Fork/Join is?
Check these links -
http://www.artima.com/forums/flat.jsp?forum=276&thread=219155
http://lambda-the-ultimate.org/node/3521
http://www.ibm.com/developerworks/java/library/j-jtp11137.html
Say you have a collection of things that need to be processed. You have a number of threads that can grab subsets of this collection and process them. They all do this concurrently (the fork part) then wait on the last one to finish (the join part) before returning.
Fork Join is a new framework that has an easier to use API for a parallel, divide and conquer algorithm.
Say you have a long running task that, for this instance, has a complicated algorithm. You would want to fork the large tasks and now work on those two tasks. Now lets say that that those two tasks are still too big, you would fork each into two tasks (at this point there are four).
You would continue this until each task is at an acceptable size and invoke the algorithm. It is important to know the invocation of each task is done in parallel. When the task is completed it is joined with the other task it was forked with and consolidate the results.
This will continue until all tasks have been joined and one task is returned.