concurrency

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.

Syndicate content