X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git;a=blobdiff_plain;f=t%2F54-unwind-threads.t;h=490e6ad56137d6f5ba69e1b82884316ccb17989f;hp=af6a3ca4acee5d98460b21d98450595caf4530dd;hb=57746d0b3de44a1205902e433488c8a1afe69469;hpb=8aa5517d42b61e877ca7e4198f12ab879fa8218b diff --git a/t/54-unwind-threads.t b/t/54-unwind-threads.t index af6a3ca..490e6ad 100644 --- a/t/54-unwind-threads.t +++ b/t/54-unwind-threads.t @@ -38,12 +38,17 @@ sub up1 { ); is_deeply \@res, [ -1, $tid .. $tid + 2, -2 ], "$p: unwinded correctly"; + + return 1; } my @threads = map spawn(\&up1), 1 .. 30; -$_->join for @threads; +my $completed = 0; +for my $thr (@threads) { + ++$completed if $thr->join; +} pass 'done'; -done_testing(scalar(@threads) + 1); +done_testing($completed + 1);