Proposal: Tidy up and export PSQ from base

Brandon Moore brandon_m_moore at yahoo.com
Thu May 5 08:31:07 CEST 2011


> 2011-5-4 8:53:50 PM, wren ng thornton

> On 5/1/11 7:58 PM, Edward Z. Yang wrote:
> > OK, to summarize the current  discussion:
> > - It would be nice to have a general-purpose priority queue  in containers.
> >    I'm not interested in this goal per se, but  I do view it as the
> cleanest way
> >    to get what I  want.
> 
> With regards to this point, is there any reason why the following  does 
> not suffice (albeit not in base)?
> 
>       http://code.google.com/p/priority-queues/
> 
> They're not priority *search*  queues, but I'm not sure how much to read 
> into your leaving out that  word...
>

That word is pretty significant. In a priority queue every element also
has a key, which can be used to efficiently remove it or adjust the
priority.

That package wouldn't support cancelling a timeout, for example.

Brandon




More information about the Libraries mailing list