Re: [akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-14 Thread Viktor Klang
On Wed, Jan 14, 2015 at 2:44 PM, Endre Varga endre.va...@typesafe.com wrote: On Fri, Jan 9, 2015 at 10:02 PM, Viktor Klang viktor.kl...@gmail.com wrote: On Fri, Jan 9, 2015 at 9:40 PM, David Hotham david.hot...@googlemail.com wrote: Of course it's normal and expected that a

Re: [akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-14 Thread Konrad Malawski
Awesome contribution David, thanks a lot! We'll think of a plan on how to include or replace the old impl with your PR and ping that issue again soon :-) On Sat, Jan 10, 2015 at 4:08 PM, David Hotham david.hot...@googlemail.com wrote: I've submitted a first stab at an implementation at pull

[akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-09 Thread David Hotham
It occurs to me that I wasn't completely clear: - Of course the priority mailbox must break message ordering in some general sense. Else it wouldn't be a priority mailbox at all! - But it is highly surprising to me that it should break ordering for messages of equal priority between

Re: [akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-09 Thread David Hotham
Of course it's normal and expected that a PriorityQueue returns equal priority elements in arbitrary order. That's just how heaps work. However that doesn't imply that a mailbox has to do the same thing! For instance, I guess that it shouldn't be very hard for the mailbox to maintain a

Re: [akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-09 Thread Viktor Klang
Hi David, yes, I can definitely understand that it can be surprising, but I wouldn't call it a bug -per se-, since it is not a promise that was violated. If you happen to have, or come by, a performant version of a PriorityQueue with the semantics you described, please don't hesitate to share

Re: [akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-09 Thread Viktor Klang
On Fri, Jan 9, 2015 at 9:40 PM, David Hotham david.hot...@googlemail.com wrote: Of course it's normal and expected that a PriorityQueue returns equal priority elements in arbitrary order. That's just how heaps work. However that doesn't imply that a mailbox has to do the same thing!