[erlang-questions] [ANN] Priority Queue Implementation

Ulf Wiger <>
Thu Nov 10 10:01:17 CET 2011


On 10 Nov 2011, at 09:12, Michael Truog wrote:

> I previously added code that took care of that case, where two nodes needed to be merged that both have queues.  However, I convinced myself at the time, that the case would never happen.  So, the code probably needs to be thought-through a bit more with more testing, but my hope is that merging the queues isn't necessary.  I haven't been able to crash the data structure without that case while using many priorities, but it still requires investigation.

I guess it depends in part on whether merge/2 is used as an internal helper function, or exported as part of the API. If it's an API function, one should probably assume that it *could* happen. Otherwise, I'm inclined to agree that it shouldn't be needed.

BR,
Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com






More information about the erlang-questions mailing list