]> git.vpit.fr Git - perl/modules/Test-Leaner.git/blobdiff - lib/Test/Leaner.pm
Lock before setting $no_diag
[perl/modules/Test-Leaner.git] / lib / Test / Leaner.pm
index dfba80f1505119d9e795865661fbe6264413b0fb..9e39fe570e61d745eb657348b79751318f86bdc7 100644 (file)
@@ -35,7 +35,7 @@ sub SKIP_ALL () { -2 }
 
 BEGIN {
  if (THREADSAFE) {
-  threads::shared::share($_) for $plan, $test, $failed, $no_diag;
+  threads::shared::share($_) for $plan, $test, $failed, $no_diag, $done_testing;
  }
 
  lock $plan if THREADSAFE;
@@ -143,6 +143,7 @@ sub import {
     push @imports, @{ $_[$i+1] };
     $splice  = 2;
    } elsif ($item eq 'no_diag') {
+    lock $plan if THREADSAFE;
     $no_diag = 1;
     $splice  = 1;
    }