6 require Config; import Config;
7 if (! $Config{'usethreads'}) {
11 $ENV{PERL_DESTRUCT_LEVEL} = 0; # XXX known trouble with global destruction
24 # create a thread passing args and immedaietly wait for it.
25 my $t = new Thread \&content,("ok 2\n","ok 3\n");
28 # check that lock works ...
30 $t = new Thread sub { lock $foo; print "ok 5\n" };
42 $ret = Thread->new(\&islocked, @_);
47 $t = new Thread \&islocked, map { "ok $_\n" } 6..10;
50 # test that sleep lets other thread run
51 $t = new Thread \&islocked,"ok 11\n";