use threads::shared;
my $code : shared;
$code = 0;
- no indirect cb => sub { lock $code; ++$code };
+ no indirect hook => sub { lock $code; ++$code };
sub X3::DESTROY { eval $_[0]->{code} }
threads->create(sub {
my $x = bless { code => 'new Z3' }, 'X3';
exit $code;
RUN
skip RUN_PERL_FAILED() => 1 unless defined $status;
- is $status, 0, 'indirect does not check eval STRING during global destruction at the end of a thread';
+ my $code = $status >> 8;
+ is $code, 1, 'indirect checks eval STRING during global destruction at the end of a cloned thread';
}