[issue4680] Queue class should include high-water mark

2008-12-17 Thread Roy Smith
Roy Smith added the comment: I'm suppose you could implement this in a subclass, but it would be inefficient. You'd have to over-ride put() and get(), call qsize(), then delegate to Base.put() and Base.get(). A cleaner solution would be in the C implementation of deque, in Modules/collectionsm

[issue4680] Queue class should include high-water mark

2008-12-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Antoine. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue4680] Queue class should include high-water mark

2008-12-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: It is probably easy enough to do so in a custom Queue subclass, and it's too specialized to put in the standard library IMHO. I'm closing the bug, another developer can reopen it if he thinks it is truely useful. -- nosy: +pitrou resolution: -> rejecte

[issue4680] Queue class should include high-water mark

2008-12-16 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: +Python 2.7 -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue4680] Queue class should include high-water mark

2008-12-16 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue4680] Queue class should include high-water mark

2008-12-16 Thread Roy Smith
New submission from Roy Smith : It would be nice if Queue.Queue included a way to access the high-water mark, i.e. the largest value which qsize() has ever reached. This is often useful when assessing application performance. I am assuming this is cheap, i.e. O(1), to provide. -- com