[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 16:15:02 EST 2012


 

Dear Vitaly, 

thanks. 

BR 

Aleks 

On 10-02-2012 21:22, Vitaly
Davidovich wrote: 

> You can replace it with j.u.c.CountdownLatch (with
a count of 1 for a one-time signal). 
> 
> Sent from my phone 
> On Feb
10, 2012 3:17 PM, "Aleksandar Lazic" <al-javaconcurrencyinterest at none.at
[4]> wrote:
> 
>> Dear list members,
>> 
>> currently I read the book
>>

>> Concurrent Programming in Java: Design Principles and Patterns,
(second edition)
>> 
>> 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
>> 
>>
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
[1]
>> 
>> 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
>> 
>> Aleks
>>
_______________________________________________
>> Concurrency-interest
mailing list
>> Concurrency-interest at cs.oswego.edu [2]
>>
http://cs.oswego.edu/mailman/listinfo/concurrency-interest [3]



Links:
------
[1]
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
[2]
mailto:Concurrency-interest at cs.oswego.edu
[3]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest
[4]
mailto:al-javaconcurrencyinterest at none.at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120210/e9b8b53a/attachment.html>


More information about the Concurrency-interest mailing list