Josh Rosenberg added the comment:

sched has been around for a long time, but it's been useless for so many 
purposes that it *should* handle (completely unsafe in threaded contexts until 
3.3, still can't handle useful threaded scenarios today, e.g. scheduling tasks 
for short delays when draining the task queue, waiting on a task with a long 
delay, see #20126 ) that calling it acceptable is more about lack of available 
uses than acceptable design.

Saying "don't schedule two events for the same time and priority if expect to 
cancel either of them" is not a reasonable solution; the main reason to 
schedule two such events in that way would be to have the option to cancel one 
but not the other; as is, trying to cancel one will (pseudo-)randomly cancel 
either of them. I don't particularly care how it's fixed (though the proposed 
fix for #13451 seems like a good one), and the issue with changing event order 
isn't so important, but cancelling the wrong event is really bad.

----------
nosy: +josh.r

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19270>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to