mirror of
https://github.com/opnsense/src.git
synced 2026-03-09 01:30:47 -04:00
16 lines
279 B
Perl
16 lines
279 B
Perl
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";
|
|
}
|