threads

Java Concurrency Series- How to use Lock/RentrantLock in Java 5

Average: 5 (2 votes)

In this article, we will examine the subtleties of using newly introduced Lock classes in java.util.concurrent.locks package and their advantages over traditional "synchronized" blocks and methods.

Java Concurrency Series- How to use Future/FutureTask and Callable

Average: 4.3 (8 votes)

In this article we will discuss how to use the new interface Callable introduced in java.concurrent.util in Java 5. Callable along with another interface Future allows us to obtain a return value from a method executed in a separate thread.
In the second example we will also examine the usage of FutureTask, an implementation of Future.

Java Concurrency Series - another Executor example

Average: 4 (1 vote)

In an earlier article on Executor, we looked at how we can create use the executor to create thread pools to manage our multi-threaded program. We shall continue to explore additional features of this class.
Here we will extend the ThreadPooledExecutor class and provide our implementation to replace the empty implementation.

Syndicate content