[concurrency-interest] Proposal WeightedLinkedBoundedQueue

Thierry Hanot thanot at infovista.com
Thu Nov 30 03:04:03 EST 2006


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 :).

Thierry Hanot  

-----Original Message-----
From: Brian Goetz [mailto:brian at quiotix.com] 
Sent: mardi 28 novembre 2006 19:50
To: dholmes at ieee.org
Cc: Thierry Hanot; concurrency-interest at cs.oswego.edu
Subject: Re: [concurrency-interest] Proposal WeightedLinkedBoundedQueue

> Tim's generalised semaphore approach also sounds feasible - and much 
> simpler in terms of getting the blocking semantics for excess weight.

This works as long as an object's weight doesn't change after permits 
are acquired.  (This property follows from effective immutability, which

will often hold for things that are put on a shared queue.)



More information about the Concurrency-interest mailing list