Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sched scheduler.queue class member is unordered #46169

Closed
pbureau mannequin opened this issue Jan 17, 2008 · 7 comments
Closed

sched scheduler.queue class member is unordered #46169

pbureau mannequin opened this issue Jan 17, 2008 · 7 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@pbureau
Copy link
Mannequin

pbureau mannequin commented Jan 17, 2008

BPO 1861
Nosy @gvanrossum, @rhettinger

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/rhettinger'
closed_at = <Date 2008-01-17.19:32:26.823>
created_at = <Date 2008-01-17.16:38:06.146>
labels = ['type-feature', 'library']
title = 'sched scheduler.queue class member is unordered'
updated_at = <Date 2008-01-17.19:32:26.822>
user = 'https://bugs.python.org/pbureau'

bugs.python.org fields:

activity = <Date 2008-01-17.19:32:26.822>
actor = 'rhettinger'
assignee = 'rhettinger'
closed = True
closed_date = <Date 2008-01-17.19:32:26.823>
closer = 'rhettinger'
components = ['Library (Lib)']
creation = <Date 2008-01-17.16:38:06.146>
creator = 'pbureau'
dependencies = []
files = []
hgrepos = []
issue_num = 1861
keywords = []
message_count = 7.0
messages = ['60033', '60036', '60037', '60044', '60046', '60049', '60051']
nosy_count = 3.0
nosy_names = ['gvanrossum', 'rhettinger', 'pbureau']
pr_nums = []
priority = 'low'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue1861'
versions = ['Python 2.6']

@pbureau
Copy link
Mannequin Author

pbureau mannequin commented Jan 17, 2008

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.

@pbureau pbureau mannequin added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir labels Jan 17, 2008
@gvanrossum
Copy link
Member

Raymond touched it last. :-) Perhaps r38041 is to blame?

@gvanrossum
Copy link
Member

Looking at that change more, the queue is now maintained as a heapq.
Perhaps the queue member is for internal use only?

@pbureau
Copy link
Mannequin Author

pbureau mannequin commented Jan 17, 2008

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.

@gvanrossum
Copy link
Member

Sure.

@rhettinger
Copy link
Contributor

Will add a method that returns an ordered list of events.

@rhettinger rhettinger added type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels Jan 17, 2008
@rhettinger
Copy link
Contributor

Checked-in in rev 60024.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants