Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
> I want to examine the first (oldest) element in queue and > remove it if it's too old. Why not just dismiss older queue entries during a normal get() operation? Or just use a plain deque with access guarded by a lock. FWIW, the standard library queue module doesn't have a straight-forward way to implement a peek() method. The module guarantees that the underlying data structure is only accessed with _init, _qsize, _get, and _put. That would be difficult to do atomically with a Queue object. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35118> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com