Message172376
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 |
|
Date |
User |
Action |
Args |
2012-10-08 12:05:24 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, giampaolo.rodola |
2012-10-08 12:05:24 | serhiy.storchaka | set | messageid: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> |
2012-10-08 12:05:24 | serhiy.storchaka | link | issue16165 messages |
2012-10-08 12:05:23 | serhiy.storchaka | create | |
|