At 10:41 AM 6/4/2001 -0400, Geoff Talvola wrote:
>At 09:36 PM 6/3/01 -0400, Jay Love wrote:
>
>>We talked about this a while back, and I thought the conclusion was to do 
>>it.  It's not very complex, anyway.  But let's revive the debate....
>
>Last time we went around on this issue, I argued that you're better off 
>preallocating all needed threads up front.  At least on Windows NT, the 
>overhead of a thread that's merely blocking on a Python Queue is basically 
>nil.  Other OS's may have worse thread implementations though -- for all 
>of NT's faults, it seems that threading is one thing it gets right.

I don't have a strong opinion on this particular one at this point.


>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?

That's a good point. Queue.py is only 140 lines of code and it would 
probably be pretty easy to create a Stack.py. I'd be curious about the 
change in benchmarks, if any. Stack.py is only worth it if it results in a 
gain.


-Chuck


_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to