aspose file tools*
The moose likes Threads and Synchronization and the fly likes Javier, main differences between Java 6 and 7 for concurrence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Javier, main differences between Java 6 and 7 for concurrence" Watch "Javier, main differences between Java 6 and 7 for concurrence" New topic
Author

Javier, main differences between Java 6 and 7 for concurrence

Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
Hi,

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?

Thank you!


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
author
Greenhorn

Joined: Dec 10, 2012
Posts: 20
    
    5

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.

If you need more info, please let me know


Author of Java 7 Concurrency Cookbook
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javier, main differences between Java 6 and 7 for concurrence