Thread programming8 articles
“Synchronized” was revolutionary and still has great uses. But it’s time to move to newer thread primitives and rethink our core logic.
Java Thread Programming (Part 15)
Learn how to do asynchronous method invocation with Callable and Future with a practical example.
Thinking About Massive Throughput? Meet Virtual Threads!
Virtual threads not only help to increase application throughput by running a much bigger number of concurrent tasks together, they also provide a framework to refactor already existing code.
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 4)
We need to be very careful when using the “volatile” keyword, and we should use it only where it’s required, and definitely not everywhere.
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 2)
Let’s see an example of where we can use Threads. Let’s assume we are building a web server that returns the most used words in a website.