summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/ext/Thread/die.t
blob: 623940579ffd18abac5ba8e0773909b03b5f0ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use Thread 'async';

$t = async {
    print "here\n";
    die "success";
    print "shouldn't get here\n";
};

sleep 1;
print "joining...\n";
eval { @r = $t->join; };
if ($@) {
    print "thread died with message: $@";
} else {
    print "thread failed to die successfully\n";
}
OpenPOWER on IntegriCloud