in reply to thread failed to start?

On Linux, at least, each thread takes a slot in your process table, so you may be running into table size limits, which'd prevent thread starting. I'm not sure if Windows has a similar limitation, since it handles threads a bit differently.

Replies are listed 'Best First'.
Re: Re: thread failed to start?
by noslenj123 (Scribe) on Mar 10, 2003 at 17:18 UTC
    I was wondering too if there was some sort of file handle limit I was running in to. I have not been able to find out what it might be using perl 5.8.0 from activestate under win2k. I see a lot of talk about 256 but can't verify it. :-(
      yeah, it seems ActiveState 5.8.0 under WinXP, only 256 threads can be created. If Try to start more than that the program exits, no error, no warning. . . .:

      use strict; use threads; my $num_threads = 0; for(1..257) { my $thr = threads->new(\&threader); $num_threads++; print "$num_threads started\r"; } print "$num_threads running\n"; sleep(); sub threader { sleep(); }