[concurrency-interest] PriorityLinkedQueue ?
hanson.char at gmail.com
Tue Sep 12 00:29:49 EDT 2006
>This might be useful for creating work load with priority associated with
it and submitting
> to the threadpool executor.
If you can determine the priority of each work item a priori, you can assign
it an expired "delay" and place it on a j.u.c.DelayQueue. The higher the
prioirty, the further into the past a work item should be "expired".
The consumer(s) can then dequeue/process items with a priority according to
However, if the prioirty of each work item needs to be changed after it has
been placed on the queue, then this won't work as DelayQueue would ignore
It would be really nice if there is a "decrease Key" operation as Tim
Peierls pointed out earlier under the email thread "Changing delays in
On 9/11/06, Hanson Char <hanson.char at gmail.com> wrote:
> Is j.u.PriorityQueue what you are looking for ?
> On 9/11/06, rbalamohan <rbalamohan at sonoasystems.com > wrote:
> > The results look really promising.
> > On a similar note, I was wondering why we don't have "PRIORITY BASED
> > LINKED QUEUE"
> > This might be useful for creating work load with priority associated
> > with it and submitting to the threadpool executor.
> > ~Rajesh.B
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest