Let’s replace the synchronized keyword to be more virtual threads friendly in a code readable way.
-
Relearning Java Thread Primitives
“Synchronized” was revolutionary and still has great uses. But it’s time to move to newer thread primitives and rethink our core logic.
-
Why the Cool Kids Use Event Loops
Check out some of the key points to consider, as well as a full code sample, when choosing to use event Loops!
-
Java Thread Programming (Part 15)
Learn how to do asynchronous method invocation with Callable and Future with a practical example.
-
5 Things You Probably Didn’t Know About Java Concurrency
Even while threads are helpful, they are dreadful to many developers. Here are five essential threading concepts for Java developers!
-
Java Thread Programming (Part 14)
What if we get a recursive situation when child tasks create more tasks and the parents wait for child tasks to finish?
-
Java Thread Programming (Part 13)
What is the maximum number of worker threads we can put in a ThreadPool? Let’s find out today on Foojay’s amazing Java threading series!
-
Java Thread Programming (Part 6)
Have you ever wondered what is the purpose of the “wait()”, “notify()”, “notifyAll()” methods that come with each Java object?
-
Java Thread Programming (Part 5)
In this article, we will discuss another situation called “race conditions” and how we can resolve it.
-
Java Thread Programming (Part 3)
Tip: We can only ask the Java thread to execute a piece of code, but we cannot guarantee the execution order of multiple threads!
-
Java Thread Programming (Part 1)
We write code in a file line by line, and then it gets executed. To be able to execute a piece of code requires an execution environment. In Java, a thread is an executing environment. If a program has only one executing environment, then we call this program a single-threaded program.