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 josiahcarlson
Recipients akuchling, djarb, facundobatista, forest, giampaolo.rodola, gvanrossum, jafo, josiahcarlson, markb
Date 2008-09-19.02:24:01
SpamBayes Score 1.8882287e-09
Marked as misclassified No
Message-id <1221791043.75.0.352455775322.issue1641@psf.upfronthosting.co.za>
In-reply-to
Content
I have an updated sched.py module which significantly improves the 
performance of the cancel() operation on scheduled events (amortized 
O(log(n)), as opposed to O(n) as it is currently).  This is sufficient 
to make sched.py into the equivalent of a pair heap.

From there, it's all a matter of desired API and features.

My opinion on the matter: it would be very nice to have the asyncore 
loop handle all of the scheduled events internally.  However, being able 
to schedule and reschedule events is a generally useful feature, and 
inserting the complete functionality into asyncore would unnecessarily 
hide the feature and make it less likely to be used by the Python 
community.

In asyncore, I believe that it would be sufficient to offer the ability 
to call a function within asyncore.loop() before the asyncore.poll() 
call, whose result (if it is a number greater than zero, but less than 
the normal timeout) is the timeout passed to asyncore.poll().  Obviously  
the function scheduler would be written with this asyncore API in mind.
History
Date User Action Args
2008-09-19 02:24:04josiahcarlsonsetrecipients: + josiahcarlson, gvanrossum, akuchling, facundobatista, jafo, forest, giampaolo.rodola, djarb, markb
2008-09-19 02:24:03josiahcarlsonsetmessageid: <1221791043.75.0.352455775322.issue1641@psf.upfronthosting.co.za>
2008-09-19 02:24:03josiahcarlsonlinkissue1641 messages
2008-09-19 02:24:01josiahcarlsoncreate