This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
threads.t: make stress test less stressy
authorDavid Mitchell <davem@iabyn.com>
Thu, 3 Dec 2015 14:30:10 +0000 (14:30 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 3 Dec 2015 14:35:15 +0000 (14:35 +0000)
Test 10 creates 100 threads that do 'require IO'. This can use a lot
of memory and other resources. reduce it to 10.

t/op/threads.t

index e76c956..123ad27 100644 (file)
@@ -139,7 +139,7 @@ watchdog(180, "process");
 {
     local $SIG{__WARN__} = sub {};   # Ignore any thread creation failure warnings
     my @t;
-    for (1..100) {
+    for (1..10) {
         my $thr = threads->create( sub { require IO });
         last if !defined($thr);      # Probably ran out of memory
         push(@t, $thr);