9408: ITCREATE: thread handle:2ca0 thread-id: 3620x ... thread handle:2ca0 thread-id: 0x GetLastError output: '6' #### *** CritSec initialised *** RXD+ had been started on port 1600 ... #### use warnings; use threads stack_size => 4096; use threads::shared; use IO::Handle; use IO::Socket::INET; use File::Find; use File::Path; use Digest::SHA; ... #### ... unless ($client = $lsn->accept) { tprint ("Could not connect to socket: " . $!); next; } if( threads::list( threads::running >= 100 ) { $client->shutdown( 2 ); $client->close; tprint( "Client $client rejected; too many concurrent clients." ); next; } ... #### my $fh; open $fh, "testRXD.txt" or die $!; my $i = 0; while (my $line = <$fh>){ chomp $line; system 1, $line; # printf STDERR "task %d '$line' running\n", ++$i; sleep 1 while `tasklist | find "perl.exe" | wc -l` > 100; } close $fh;