Tavis Rudd <[EMAIL PROTECTED]> wrote:
> On Monday 04 June 2001 07:41, Geoff Talvola wrote:
> > I also argued that we'd be better off storing the threads
> > on a stack instead of a queue. That way the most
> > recently used threads get reused, which may produce
> > slightly better performance. I wonder if there's a
> > thread-safe Stack class analogous to the Queue class that
> > comes with Python?
>
> Good idea. I've never heard of a Stack class like this but it
> would be very easy to create a subclass of Queue that has
> LIFO rather than FIFO behaviour. Do you think it would make
> much of a difference?
Well, what about .pop() and .append() ? If they are atomic, then they
are thread-safe. Append is atomic, and I bet pop is too. But maybe
there's spiffier things that the Queue class does that a Stack class
could do too. Queue docs specifically refer to subclassing to make a
Stack class.
Ian
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel