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.