Fine here under FC2: $ python test.py Starting new threads ... numbers ... OK for 20000 threads - 20 threads running in parallel 1000 $ uname -srvmpio Linux 2.6.8-1.521 #1 Mon Aug 16 09:01:18 EDT 2004 i686 athlon i386 GNU/Linux
On Sat, 2004-10-16 at 12:08, James R. Phillips wrote: > I have been experiencing times when my Webware site > at http://zunzun.com will simply stop running, cause > unknown. Investigation to date shows that there is some > thread problem, which I would like to discuss. > > Below is a simple Python program to test multithreading. > This program runs smoothly and quickly on my home > Windows XP computer as expected. On the Linux server > where my site resides, it runs slowly and jerkily, > finally ending with the message "Killed". I would > like to ask that others please try this program and > see how it runs on their computers, this may be why > people occasionally report unexplainable WebKit site > applications stopping. > > If there is a problem with my test code, please let > me know. I do not see one and don't know why it runs > differently on the two computers I have access to. > > James Phillips > http://zunzun.com > > import os, sys, thread > > loopCount = 1000 > threadCount = 20 > threadsRunning = 1 > threadsTotal = 0 > t = 0 > lock = thread.allocate_lock() > > def ThreadTest(): > global threadsTotal, threadsRunning, lock > lock.acquire() > threadsTotal += 1 > threadsRunning -= 1 > lock.release() > > print "Starting new threads" > for i in range(loopCount): > threadsRunning = threadCount > for threads in range(threadCount): > thread.start_new(ThreadTest, ()) > > while threadsRunning > 0: > lock.acquire() > if threadsTotal != t: > print threadsTotal, > sys.stdout.flush() > t = threadsTotal > lock.release() > > print > print "OK for", threadsTotal, "threads -", threadCount, "threads running > in parallel", loopCount > print > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Webware-discuss mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-discuss ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss