This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients giampaolo.rodola, pitrou, rhettinger, serhiy.storchaka, stutzbach, vstinner
Date 2019-08-22.09:39:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566466746.58.0.598776217159.issue13451@roundup.psfhosted.org>
In-reply-to
Content
I no longer think this should be done. For most applications, cancel() speed is the least important task and isn't worth adding any extra baggage to the run() loop.  The current cancel() code is only slow if the length is somewhat large (atypical for a scheduling app).  Also, to my eyes the patch more than doubles the complexity of the module (which can currently be almost completely understood by examining the short run-loop).  Lastly, a lazy cancel() keeps the references around longer (which may be undesirable for some apps).

If you really think this module needs a lazy cancel(), then press ahead.  Otherwise, we have no evidence that this a problem in the real world.  The current cancel call is O(n) but runs at C speed which should be plenty fast enough for most cases.
History
Date User Action Args
2019-08-22 09:39:06rhettingersetrecipients: + rhettinger, pitrou, vstinner, giampaolo.rodola, stutzbach, serhiy.storchaka
2019-08-22 09:39:06rhettingersetmessageid: <1566466746.58.0.598776217159.issue13451@roundup.psfhosted.org>
2019-08-22 09:39:06rhettingerlinkissue13451 messages
2019-08-22 09:39:06rhettingercreate