Adding idle timeout capabilities to asyncore
Paul Rubin
http
Thu Oct 25 01:20:14 EDT 2007
More information about the Python-list mailing list
Thu Oct 25 01:20:14 EDT 2007
- Previous message (by thread): Adding idle timeout capabilities to asyncore
- Next message (by thread): Adding idle timeout capabilities to asyncore
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Giampaolo Rodola' <gnewsg at gmail.com> writes: > def readable(self): > if time.time() >= self.timeout: > self.send("Timeout") > self.close() > return 1 Don't do it this way. Put all the timeouts into a priority queue (see the heapq module) so you only need to check the one due to expire soonest.
- Previous message (by thread): Adding idle timeout capabilities to asyncore
- Next message (by thread): Adding idle timeout capabilities to asyncore
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list