Java Concurrency Evolution

Java Concurrency Evolution

Java Concurrency Evolution. It is becoming crucial to understand the tooling around how the available computing capacity can be best utilized.

It is becoming crucial to understand the tooling around how the available computing capacity can be best utilized.

Since the early days of Java, Threads were available to support concurrent programming. Interestingly till Java 1.1, green threads (virtual threads) were supported by the JVM, but they were dropped in favor of native OS threads, however with Project Loom on the horizon (targeted for Java 16 or later?), virtual threads are on track to become mainstream again.

The goal of this article is to go through the main milestones for the evolution of thread/concurrency handling in Java. As the topic can easily fill a library full of books, the following aspects are out of scope (basically, the goal is to take a look at the happy path of Java concurrency):

  • Error handling – This is very limited, to say the least. Lombok’s SneakyThrows is used to support readability in the code examples.
  • Libraries and Frameworks supporting concurrency – There are endless alternative solutions for the JVM (e.g., Quasar, Akka, Guava, EA Async…)
  • Sophisticated stop conditions – When kicking off a thread with a given task, it is not always clear how and how long to wait for its completion
  • Synchronization between threads – The literature is endless about this.

So, what will we covering here, you may ask? A very valid question as it may seem that we excluded all the fun stuff. We will take an example task which we will solve multiple times using newer / different approaches, and we will compare their execution ”behavior.” By nature, this list can’t be complete. I tried to collect the native solutions (the reactive approach is the outlier here, but it became mainstream enough not to leave it out).

java java concurrency java threads project loom

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

17 Interesting Java Project Ideas & Topics For Beginners [2021]

Looking for Java Project Ideas? Start off with these cool Java projects to test your strengths & weakness but also help you to gain exposure that can be helpful for boosting your career. All are explained in this article and it's completely free.

How to Install OpenJDK 11 on CentOS 8

What is OpenJDK? OpenJDk or Open Java Development Kit is a free, open-source framework of the Java Platform, Standard Edition (or Java SE).

Top 8 Java Open Source Projects You Should Get Your Hands-on [2021]

Top 8 Java Open Source Projects You Should Get Your Hands-on [2021]. Learning about Java is no easy feat. It’s a prevalent and in-demand programming language with applications in numerous sectors. We all know that if you want to learn a new skill, the best way to do so is through using it. That’s why we recommend working on projects.  So if you’re a Java student, then […]

Top Android Projects with Source Code

Android projects with source code - Work on real-time android projects. We’ll start project ideas from beginners level and later move to advance projects.

Going Beyond Java 8: Local Variable Type Inference (var) - DZone Java

In this article, we will talk about the most important new feature introduced with Java 10, officially called local variable type inference. An extremely important function in java. You will regret skipping this article.