6 if (! $Config{'useithreads'}) {
7 print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
12 use ExtUtils::testlib;
19 # You have to do it this way or VMS will get confused.
21 print("ok $test - $name\n");
23 print("not ok $test - $name\n");
24 printf("# Failed test at line %d\n", (caller)[2]);
32 print("1..61\n"); ### Number of tests that will be run ###
38 ### Start of Testing ###
43 my $s = "abcd" x (1000 + $_[0]);
45 while ($s =~ /(.)/g) { $t .= $1 }
46 return ($s eq $t) ? 'ok' : 'not';
51 my $thr = threads->create('stress_re', $_);
52 ok($thr, "Thread created - iter $_");
58 $thr = $threads[$_-1];
59 $result = $thr->join if $thr;
60 ok($thr && defined($result) && ($result eq 'ok'), "Thread joined - iter $_");