viktor.klang at gmail.com
Wed Jan 11 17:59:34 EST 2012
2012/1/11 Dr Heinz M. Kabutz <heinz at javaspecialists.eu>
> That one is fairly easily worked around. Just wrap your submission and
> remember the insertion order, then use that in your comparison.
You mean adding yet another allocation + memory indirection + add the
overhead of either having to use: AtomicLong (another memory indirection),
a @volatile field + an updater (a bit better but not optimal, or a
@volatile field and the good old sun.misc.Unsafe (my best friend in the
world)? Not only that, all insertions will also be more expensive since it
has to factor the order into the comparison as well.
I think a proper data structure for this would be the way to go, but my
need for such a structure isn't that bad that I can sacrifice time on
But yes, for those who are willing to pay, there's generally someone that's
willing to sell :-)
> Dr Heinz M. Kabutz (PhD CompSci)
> Author of "The Java(tm) Specialists' Newsletter"
> Sun Java Champion
> IEEE Certified Software Development Professionalhttp://www.javaspecialists.eu
> Tel: +30 69 72 850 460
> Skype: kabutz
> On 1/12/12 12:43 AM, √iktor Ҡlang wrote:
> Not to mention a PriorityBlockingQueue that preserves insertion order for
> entries of the same priority ;-)
> On Wed, Jan 11, 2012 at 11:30 PM, Adrian Tarau <adrian.tarau at gmail.com>wrote:
>> It would be really great if a PriorityBlockingDeque will be available in
>> the JDK. Any recomandations for an external library?
>> Adrian Tarau.
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
> Viktor Klang
> Akka Tech Lead
> Typesafe <http://www.typesafe.com/> - Enterprise-Grade Scala from the
> Twitter: @viktorklang
> Concurrency-interest mailing listConcurrency-interest at cs.oswego.eduhttp://cs.oswego.edu/mailman/listinfo/concurrency-interest
Akka Tech Lead
Typesafe <http://www.typesafe.com/> - Enterprise-Grade Scala from the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest