[New-bugs-announce] [issue16165] sched.scheduler.run() blocks scheduler

Serhiy Storchaka report at bugs.python.org
Mon Oct 8 14:05:24 CEST 2012


New submission from Serhiy Storchaka:

sched.scheduler.run() blocks scheduler and prevents the addition of new events until all events added before start will not be processed. Canceling does not work too.

Here is test script which reproduces the behavior differences.

Output in Python 3.2:

Adding
adding 0
added 0
adding 1
added 1
adding 2
added 2
event 0
event 1
start event
event 2
Canceling

Output in Python 3.3:

Adding
adding 0
start event
added 0
adding 1
added 1
adding 2
added 2
Canceling
event 0
event 1
event 2
Traceback (most recent call last):
  File "schedtest.py", line 20, in <module>
    s.cancel(e)
  File "/home/serhiy/py/cpython/Lib/sched.py", line 93, in cancel
    self._queue.remove(event)
ValueError: list.remove(x): x not in list

----------
components: Library (Lib)
files: schedtest.py
keywords: 3.3regression
messages: 172376
nosy: giampaolo.rodola, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: sched.scheduler.run() blocks scheduler
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27488/schedtest.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16165>
_______________________________________


More information about the New-bugs-announce mailing list