Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use fork-and-join in JDK6

As I understand jdk7 has the support for fork-and-join, Can I use fork-and-join in JDK6 without upgraging to JDK7.0?

like image 811
Shamik Avatar asked Nov 21 '11 00:11

Shamik


People also ask

How do you use fork and join?

The fork() method submits a task to a pool, but it doesn't trigger its execution. We must use the join() method for this purpose. Here we used the invokeAll() method to submit a sequence of subtasks to the pool. We can do the same job with fork() and join(), though this has consequences for the ordering of the results.

Is fork join parallel?

Fork–join is the main model of parallel execution in the OpenMP framework, although OpenMP implementations may or may not support nesting of parallel sections. It is also supported by the Java concurrency framework, the Task Parallel Library for . NET, and Intel's Threading Building Blocks (TBB).

What is difference between executor framework and ForkJoinPool?

In short, the main difference between the Executor framework and ForkJoinPool is that the former provides a general-purpose thread pool, while the latter provides a special implementation that uses a work-stealing pattern for efficient processing of ForkJoinTask.


1 Answers

Yup, see here - the package you want is jsr166y.

like image 89
Michael Berry Avatar answered Sep 30 '22 04:09

Michael Berry