integrate mainline changes
[p5sagit/p5-mst-13.2.git] / t / lib / thread.t
index 61997cf..6c25407 100755 (executable)
@@ -5,7 +5,7 @@ BEGIN {
     unshift @INC, '../lib';
     require Config; import Config;
     if (! $Config{'usethreads'}) {
-       print "1..0\n";
+       print "1..0 # Skip: this perl is not threaded\n";
        exit 0;
     }
 
@@ -24,7 +24,7 @@ sub content
 }
 
 # create a thread passing args and immedaietly wait for it.
-my $t = new Thread \&content,("ok 2\n","ok 3\n");
+my $t = new Thread \&content,("ok 2\n","ok 3\n", 1..1000);
 print $t->join;
 
 # check that lock works ...
@@ -55,9 +55,7 @@ sleep 6;
 print "ok 12\n";
 $t->join;
 
-sub islocked
-{
- use attrs 'locked';
+sub islocked : locked {
  my $val = shift;
  my $ret;
  print $val;
@@ -74,8 +72,7 @@ $t->join->join;
 {
     package Loch::Ness;
     sub new { bless [], shift }
-    sub monster {
-       use attrs qw(locked method);
+    sub monster : locked, method {
        my($s, $m) = @_;
        print "ok $m\n";
     }