Java Thread Programming (Part 12)
Let’s find out what are the ways to create ThreadPool using the Executor framework in java and use result-bearing tasks using Callable and Future
Let’s find out what are the ways to create ThreadPool using the Executor framework in java and use result-bearing tasks using Callable and Future
Learn how to ask the executor framework at startup to provision threads for us and they will be reused as long as the application runs.
Let’s learn about BlockingQueue, one of the essential concurrent collections available in the concurrent package in the JDK.
Let’s continue the discussion and share a few more thread-safe classes that we can use in our day-to-day coding!
The term thread safety is a frequently and commonly pronounced word among Java developers. However, it is still one of the misunderstood terms as well. In this article, I will try to explain in a very simplified way what it is and how we can achieve it while we write our day-to-day code. The idea … Read more
Can we create as many Java threads as we want? I will try to come up with an answer via an exercise, so bear with me!
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.