This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sched scheduler.queue class member is unordered
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: gvanrossum, pbureau, rhettinger
Priority: low Keywords:

Created on 2008-01-17 16:38 by pbureau, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg60033 - (view) Author: Patrick Bureau (pbureau) Date: 2008-01-17 16:38
In Python 2.4, retrieving sched's scheduler.queue class member would
return a time ordered list of events as expected. 

Since Python 2.5, the same operation retrieves a list of unordered
scheduled events. This makes it difficult to know which events are
really next in queue, especially if scheduled at the same time.
msg60036 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-01-17 17:29
Raymond touched it last. :-)  Perhaps r38041 is to blame?
msg60037 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-01-17 17:31
Looking at that change more, the queue is now maintained as a heapq. 
Perhaps the queue member is for internal use only?
msg60044 - (view) Author: Patrick Bureau (pbureau) Date: 2008-01-17 18:24
Indeed, the queue is not directly exposed by a method, but the
information is nonetheless interesting for monitoring the content. If
it's not a bug, then maybe this could be changed to a feature request
for a new method to retrieve the queue's events.
msg60046 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-01-17 18:26
Sure.
msg60049 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-01-17 18:41
Will add a method that returns an ordered list of events.
msg60051 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-01-17 19:32
Checked-in in rev 60024.
History
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 46169
2008-01-17 19:32:26rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg60051
2008-01-17 18:41:12rhettingersettype: behavior -> enhancement
messages: + msg60049
versions: + Python 2.6, - Python 2.5
2008-01-17 18:26:55gvanrossumsetpriority: low
messages: + msg60046
2008-01-17 18:24:03pbureausetmessages: + msg60044
2008-01-17 17:31:51gvanrossumsetmessages: + msg60037
2008-01-17 17:29:44gvanrossumsetassignee: rhettinger
messages: + msg60036
nosy: + rhettinger, gvanrossum
2008-01-17 16:38:06pbureaucreate