summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/lib
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-03-16 22:35:55 +0000
committermarkm <markm@FreeBSD.org>2002-03-16 22:35:55 +0000
commit0461d253df33e5f57be9816f42946f63a61854d1 (patch)
treebfa3c40437ffce8409065d8fff06dba8b2eaabb7 /contrib/perl5/t/lib
parent6921b1a9a737ac64d864891f28e25abc5fad97a6 (diff)
downloadFreeBSD-src-0461d253df33e5f57be9816f42946f63a61854d1.zip
FreeBSD-src-0461d253df33e5f57be9816f42946f63a61854d1.tar.gz
Punt to attic files not in 5.6.1 OR not needed by FreeBSD.
Diffstat (limited to 'contrib/perl5/t/lib')
-rwxr-xr-xcontrib/perl5/t/lib/thread.t73
1 files changed, 0 insertions, 73 deletions
diff --git a/contrib/perl5/t/lib/thread.t b/contrib/perl5/t/lib/thread.t
deleted file mode 100755
index c127d0f..0000000
--- a/contrib/perl5/t/lib/thread.t
+++ /dev/null
@@ -1,73 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require Config; import Config;
- if (! $Config{'usethreads'}) {
- print "1..0\n";
- exit 0;
- }
-
- # XXX known trouble with global destruction
- $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-}
-$| = 1;
-print "1..14\n";
-use Thread;
-print "ok 1\n";
-
-sub content
-{
- print shift;
- return shift;
-}
-
-# create a thread passing args and immedaietly wait for it.
-my $t = new Thread \&content,("ok 2\n","ok 3\n", 1..1000);
-print $t->join;
-
-# check that lock works ...
-{lock $foo;
- $t = new Thread sub { lock $foo; print "ok 5\n" };
- print "ok 4\n";
-}
-$t->join;
-
-sub dorecurse
-{
- my $val = shift;
- my $ret;
- print $val;
- if (@_)
- {
- $ret = Thread->new(\&dorecurse, @_);
- $ret->join;
- }
-}
-
-$t = new Thread \&dorecurse, map { "ok $_\n" } 6..10;
-$t->join;
-
-# test that sleep lets other thread run
-$t = new Thread \&dorecurse,"ok 11\n";
-sleep 6;
-print "ok 12\n";
-$t->join;
-
-sub islocked
-{
- use attrs 'locked';
- my $val = shift;
- my $ret;
- print $val;
- if (@_)
- {
- $ret = Thread->new(\&islocked, shift);
- }
- $ret;
-}
-
-$t = Thread->new(\&islocked, "ok 13\n", "ok 14\n");
-$t->join->join;
-
OpenPOWER on IntegriCloud