Javier, main differences between Java 6 and 7 for concurrence
Joined: Mar 04, 2009
What are the main benefits that Java 7 brings for concurrence, threads, parallel programming?
What would be very hard or not possible to do with Java 6?
ps: Congratulations for the book. I seems to be pretty good. I'm reading the sample chapter, and I like it because there are real examples, real code and doing is a very good way to learn.
Javier Fernandez Gonzalez
Joined: Dec 10, 2012
Hello Leandro and thank you for your comments
The main features introduced by the Java 7 Concurrency API are
-The new Fork/Join framework
-The phaser class, that is a new synchronization mechanism to execute tasks that can be divided into phases
-Some data structures that can be used in concurrent applications.
All these elements are oriented to solve concrete problems. The fork/join framework is oriented to get a better performance in problems that can be solved using a divide and conquer approach. The phaser class is uses to synchronize concurrent tasks that are divided into phases when you need to synchronize the tasks between each phase. You can solve that problems with Java 6 concurrency elements, but probably your program will have worse throwput.