One of our reader, Anant, asked this extremely good question to elaborate / list down all related topics that we should know about multi-threading including changes made in java 8.( Beginner level to Advance level). All he wanted to know was evolution of Multi-threading Framework in Java from Simple
Runnable interface to latest feature in Java 8. Let us solve his query.
I spent good amount of time in collecting all below information. So please feel free to suggest edit/update in below information if you think otherwise on any point.
JDK release-wise multi-threading concepts
As per JDK 1.x release, there were only few classes present in this initial release. To be very specific, there classes/interfaces were:
- and some exception classes
It also had few synchronized collections e.g.
JDK 1.2 and JDK 1.3 had no noticeable changes related to multi-threading. (Correct me if I have missed anything).
JDK 1.4, there were few JVM level changes to suspend/resume multiple threads with single call. But no major API changes were present.
JDK 1.5 was first big release after JDK 1.x; and it had included multiple concurrency utilities.
concurrent collections and
blocking queues; all were included in this release itself. The biggest change in java multi-threading applications cloud happened in this release.
Read full set of changes in this link: http://docs.oracle.com/javase/1.5.0/docs/guide/concurrency/overview.html
JDK 1.6 was more of platform fixes than API upgrades. So new change was present in JDK 1.6.
JDK 1.7 added support for
ForkJoinPool which implemented work-stealing technique to maximize the throughput. Also
Phaser class was added.
JDK 1.8 is largely known for Lambda changes, but it also had few concurrency changes as well. Two new interfaces and four new classes were added in java.util.concurrent package e.g.
The Collections Framework has undergone a major revision in Java 8 to add aggregate operations based on the newly added streams facility and lambda expressions; resulting in large number of methods added in almost all
Collection classes, and thus in concurrent collections as well.
Read full set of changes in this link: http://docs.oracle.com/javase/8/docs/technotes/guides/concurrency/changes8.html
I hope that above listings will help you understanding the multi-threading features JDK version wise.
Happy Learning !!