From: crd AT inversenet DOT com (Craig Dickson) Subject: Re: pthreads w/ cygwin32 27 Feb 1998 06:45:01 -0800 Message-ID: <000a01bd438b$9b137260$168cdad0.cygnus.gnu-win32@crd.inversenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: Chris Provenzano wrote: >Okay, is ther some flag I have to set to get a process to have more than 64 >threads? When I first tried it I just used a loop around CreateThread and >at about 64 threads CreateThread returned an error. I tried it a few times >just to be sure. I didn't do anything special. The machines I've tested this on all have 32 or 64 MB RAM and lots of disk space for swap files, running either NT4 SP3, Win95 OSR2, or Win98 RC0 (which just arrived this week). I typically use _beginthread rather than CreateThread, which MS recommends you do when your threads will make C library calls, but _beginthread calls CreateThread internally, so it shouldn't affect how many threads you can make (actually it might reduce it, since _beginthread allocates thread-specific data for the C library's use). In my tests, _beginthread starts failing between 1100 and 1600 threads. Interestingly, if I run two such programs simultaneously, they fail at around 600 to 800 threads each, which suggests an overall system limit rather than a per-process limit. Craig - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".