[concurrency-interest] PriorityQueue bug with mutable object
dl at cs.oswego.edu
Sat Jul 4 02:38:46 EDT 2009
> 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.
More information about the Concurrency-interest