Message78008
And, FWIW, I did figure out a use case for clear(). I create a queue and
pass it to two threads. One side or the other decides to abandon processing
of the events currently in the queue. I can't just create a new queue,
because you have no way to tell the other thread about it. You need to have
clear() to do this. And, no, it should not clear the high water mark.
As I see it, it comes down to this:
If you bury this in the C code inside deque(), it's very efficient compared
to the Python wrapper class. The downside is it makes the API larger than
it would otherwise be, to satisfy a use case with limited demand.
If you feel the efficiency gain doesn't justify the added complexity in the
API, I'm OK with that. I just didn't want this shot down on the basis of,
"He's asking us to invest the effort to write the code for something we
don't see a need for", hence the offer to write it myself. But, it's your
call if you want it or not. |
|
Date |
User |
Action |
Args |
2008-12-18 01:53:10 | roysmith | set | recipients:
+ roysmith, rhettinger, pitrou, LambertDW |
2008-12-18 01:53:10 | roysmith | set | messageid: <1229565190.27.0.888284453834.issue4680@psf.upfronthosting.co.za> |
2008-12-18 01:53:09 | roysmith | link | issue4680 messages |
2008-12-18 01:53:08 | roysmith | create | |
|