This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate mainline
[perl5.git] / ext / Thread / die2.tx
CommitLineData
0fcb073c
JH
1BEGIN {
2 eval { require Config; import Config };
3 if ($@) {
4 print "1..0 # Skip: no Config\n";
5 exit(0);
6 }
0fcb073c
JH
7}
8
3487771d
MB
9use Thread 'async';
10
11$t = async {
12 sleep 1;
13 print "here\n";
14 die "success if preceded by 'thread died...'";
15 print "shouldn't get here\n";
16};
17
18print "joining...\n";
19@r = eval { $t->join; };
20if ($@) {
21 print "thread died with message: $@";
22} else {
23 print "thread failed to die successfully\n";
24}