[concurrency-interest] PriorityQueue bug with mutable object

Manuel Dominguez Sarmiento mads at renxo.com
Sat Jul 4 08:22:32 EDT 2009


Thanks for taking the time to look through this.

- Manuel

Doug Lea wrote:
>> I understand this and in fact I was expecting that kind of response from
>> Sun. However since they accepted the bug I was lead to believe that it
>> might actually be a bug.
>>     
>
>
> As Martin mentioned, this doesn't mean much.
>
> And as others mentioned, this is Not A Bug. But it is
> implicitly an RFE. We don't provide a class that permits
> re-weightings. Part of the reason is algorithmic. In
> all the usual priority queue algorithms, you can't
> re-weight unless you can locate, which you don't want
> to have to do via sequential search. The usual way out
> of this is to embed inverse indices etc inside user
> elements, which we also cannot do. However, it would be
> possible to create separate indexing structure (maybe
> a hash table of some sort) for those usages that can
> tolerate extra time/space overhead for sake of extra
> functionality. This might be worth exploring someday.
>
> -Doug
>
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20090704/e46bf219/attachment.html>


More information about the Concurrency-interest mailing list