]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/40-threads.t
Reorder the arguments to the thread callback in t/40-threads.t so that they match...
[perl/modules/Variable-Magic.git] / t / 40-threads.t
index 7c6203d372df52be7cec4f1e1fbe48385aacfdc2..6fb1d36a6a743893ce766e2eef839b6ed4b54b21 100644 (file)
@@ -31,10 +31,9 @@ if (VMG_THREADSAFE) {
 }
 
 my $destroyed : shared = 0;
-my $sig = undef;
 
 sub try {
- my ($dispell, $op_info) = @_;
+ my ($dispell, $sig, $op_info) = @_;
  my $tid = threads->tid();
  my $c   = 0;
  my $wiz = eval {
@@ -84,7 +83,7 @@ sub try {
 for my $dispell (1, 0) {
  for my $sig (undef, Variable::Magic::gensig()) {
   $destroyed = 0;
-  my @t = map { threads->create(\&try, $dispell, $_) }
+  my @t = map { threads->create(\&try, $dispell, $sig, $_) }
                                (VMG_OP_INFO_NAME) x 2, (VMG_OP_INFO_OBJECT) x 2;
   $_->join for @t;
   is($destroyed, (1 - $dispell) * 4, 'destructors');