[issue16640] Less code under lock in sched.scheduler
Roundup Robot added the comment: New changeset 1bed43c0a5af by Serhiy Storchaka in branch 'default': Issue #16640: Run less code under a lock in sched module. http://hg.python.org/cpython/rev/1bed43c0a5af -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16640] Less code under lock in sched.scheduler
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16640] Less code under lock in sched.scheduler
Antoine Pitrou added the comment: What is the point of having heapq.heappush under a lock if heapq.heappop in another method is not protected? The logic doesn't seem to make sense. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16640] Less code under lock in sched.scheduler
Serhiy Storchaka added the comment: This heapq.heappop does applied to a copy of self._queue. Copying done under a lock. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16640] Less code under lock in sched.scheduler
Antoine Pitrou added the comment: Ah, ok. By the way, the queue property says it returns An ordered list, but it seems to actually return an iterator. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16640] Less code under lock in sched.scheduler
Serhiy Storchaka added the comment: Perhaps it was inherited from Python 2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16640] Less code under lock in sched.scheduler
Serhiy Storchaka added the comment: If no one objects I will commit this next year. -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16640] Less code under lock in sched.scheduler
Giampaolo Rodola' added the comment: Patch looks fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16640] Less code under lock in sched.scheduler
New submission from Serhiy Storchaka: In additional to issue16165 I think that sched.scheduler runs more code under a lock than needed. The proposed patch moves this code outside a lock. This unlikely a bug, may be only small enhancement and cleanup. -- components: Library (Lib) files: sched_less_lock.patch keywords: patch messages: 177147 nosy: giampaolo.rodola, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Less code under lock in sched.scheduler type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28255/sched_less_lock.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com