[concurrency-interest] EDU.oswego.cs.dl.util.concurrent.Latch and Sync replace with java.util.concurrent.locks.AbstractQueuedSynchronizer

Aleksandar Lazic al-javaconcurrencyinterest at none.at
Fri Feb 10 15:15:49 EST 2012

Dear list members,

currently I read the book

Concurrent Programming in Java: Design Principles and Patterns, (second 

and try to use the

abstract class DiskTask implements Runnable {

but there is the following line

protected final Latch done = new Latch(); // status indicator

After a little search I have found


with Sync and Latch but this classes are outdated.

Can I replace the class Latch with AbstractQueuedSynchronizer or is 
there a better replacement?

Thanks for your help


More information about the Concurrency-interest mailing list