MPE/iX test tweaks from Mark Bixby.
[p5sagit/p5-mst-13.2.git] / ext / Thread / die.tx
CommitLineData
0fcb073c 1BEGIN {
2 eval { require Config; import Config };
3 if ($@) {
4 print "1..0 # Skip: no Config\n";
5 exit(0);
6 }
7 if ($Config{extensions} !~ /\bThread\b/) {
8 print "1..0 # Skip: no use5005threads\n";
9 exit(0);
10 }
11}
12
3487771d 13use Thread 'async';
14
15$t = async {
16 print "here\n";
17 die "success";
18 print "shouldn't get here\n";
19};
20
21sleep 1;
22print "joining...\n";
23eval { @r = $t->join; };
24if ($@) {
25 print "thread died with message: $@";
26} else {
27 print "thread failed to die successfully\n";
28}