Re: cache-like structure

2008-08-07 Thread konstantin
> And if you change the deque for a Queue.Queue, you don't even need a > Lock... > > Cheers, > > Maxime Maxime, thanks, sched module could be a nice solution. I've never used it before but it seems to be the right way. You guessed right. I want to used it in Queue. But this implementation does no

Re: cache-like structure

2008-08-07 Thread maxime
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 _rem

Re: cache-like structure

2008-08-07 Thread maxime
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 -- http://mail.python.org/mailman/listinfo/python-list

cache-like structure

2008-08-07 Thread konstantin
Hi, I've write a class that actually is data structure with items that automatically removed from collection when timeout expires. Interface is pretty simple. First public method is to make a record. And second (__contains__) is to define if record is actually in table. I prefer async way to clean