On Aug 7, 7:00 pm, maxime <[EMAIL PROTECTED]> wrote: > konstantin wrote: > > Hi, > Hi > >... > > - are there better ways to do this (or any ready recipes) > > Did you consider using the shed module (not threaded)? > > Cheers, > > Maxime
If you need threading, what i would do is implementing a _remove method like: def _remove(self, rec): #try not to use __form, almost always an error self.records.remove(rec) the Timer would become Timer(ttl, self._remove, [(t, item)]) # t is the time that you got before And if you change the deque for a Queue.Queue, you don't even need a Lock... Cheers, Maxime -- http://mail.python.org/mailman/listinfo/python-list