5 if ($ENV{'PERL_CORE'}){
7 unshift @INC, '../lib';
10 if (! $Config{'useithreads'}) {
11 print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
16 use ExtUtils::testlib;
23 # You have to do it this way or VMS will get confused.
25 print("ok $test - $name\n");
27 print("not ok $test - $name\n");
28 printf("# Failed test at line %d\n", (caller)[2]);
36 print("1..61\n"); ### Number of tests that will be run ###
42 ### Start of Testing ###
47 my $s = "abcd" x (1000 + $_[0]);
49 while ($s =~ /(.)/g) { $t .= $1 }
50 return ($s eq $t) ? 'ok' : 'not';
55 my $thr = threads->create('stress_re', $_);
56 ok($thr, "Thread created - iter $_");
62 $thr = $threads[$_-1];
63 $result = $thr->join if $thr;
64 ok($thr && defined($result) && ($result eq 'ok'), "Thread joined - iter $_");