Rewrite synchronisation of subs/methods and add attrs
[p5sagit/p5-mst-13.2.git] / sync.t
diff --git a/sync.t b/sync.t
index 3b7b1e4..9c2e589 100644 (file)
--- a/sync.t
+++ b/sync.t
@@ -3,6 +3,7 @@ use Thread;
 $level = 0;
 
 sub single_file {
+    use attrs 'locked';
     my $arg = shift;
     $level++;
     print "Level $level for $arg\n";
@@ -50,7 +51,6 @@ sub start_baz {
 
 $| = 1;
 srand($$^$^T);
-Thread::sync(\&single_file);
 
 $foo = new Thread \&start_foo;
 $bar = new Thread \&start_bar;