[issue16640] Less code under lock in sched.scheduler

2012-12-29 Thread Roundup Robot

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

2012-12-29 Thread Serhiy Storchaka

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

2012-12-28 Thread Antoine Pitrou

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

2012-12-28 Thread Serhiy Storchaka

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

2012-12-28 Thread Antoine Pitrou

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

2012-12-28 Thread Serhiy Storchaka

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

2012-12-27 Thread Serhiy Storchaka

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

2012-12-27 Thread Giampaolo Rodola'

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

2012-12-08 Thread Serhiy Storchaka

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