From: Vincent Pit Date: Sun, 22 Feb 2009 08:04:49 +0000 (+0100) Subject: Pass the signature as a thread callback argument in t/40-threads.t X-Git-Tag: v0.32~18 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=146bea88eff25c0c068b82e0e2ddccc5055e6b73;p=perl%2Fmodules%2FVariable-Magic.git Pass the signature as a thread callback argument in t/40-threads.t --- diff --git a/t/40-threads.t b/t/40-threads.t index 7c6203d..6aade88 100644 --- a/t/40-threads.t +++ b/t/40-threads.t @@ -31,10 +31,9 @@ if (VMG_THREADSAFE) { } my $destroyed : shared = 0; -my $sig = undef; sub try { - my ($dispell, $op_info) = @_; + my ($sig, $dispell, $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, $sig, $dispell, $_) } (VMG_OP_INFO_NAME) x 2, (VMG_OP_INFO_OBJECT) x 2; $_->join for @t; is($destroyed, (1 - $dispell) * 4, 'destructors');