[concurrency-interest] Proposal WeightedLinkedBoundedQueue

Dawid Kurzyniec dawidk at mathcs.emory.edu
Thu Nov 30 12:45:02 EST 2006


Thierry Hanot wrote:
> I'll try to use the semaphore. And I agree with Tim , the weight should
> be immutable once the element is in the queue. But I'm still believe
> that we can avoid any synchronization over cost by simply modifying the
> LinkedBoundedQueue and changing the AtomicInteger used to manage the
> count :).
>   

Nothing can stop you from grabbing a public-domain source from:

http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/

and custom-fitting it for your purpose. Which is one of many reasons why
we love this library so much :)

Regards,
Dawid



More information about the Concurrency-interest mailing list