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.
concurrency
Java Concurrency Series- How to use Lock/RentrantLock in Java 5
By sharadjava - Posted on May 23rd, 2008
Tagged:
- sharadjava's blog
- 1 comment
- Read more
- 1415 reads
Java Concurrency Series- How to use Future/FutureTask and Callable
By sharadjava - Posted on May 18th, 2008
Tagged:
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.
- sharadjava's blog
- 5 comments
- Read more
- 4283 reads