diff options
Diffstat (limited to 'ext/Thread/die2.t')
-rw-r--r-- | ext/Thread/die2.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/Thread/die2.t b/ext/Thread/die2.t new file mode 100644 index 0000000000..f6b695520f --- /dev/null +++ b/ext/Thread/die2.t @@ -0,0 +1,16 @@ +use Thread 'async'; + +$t = async { + sleep 1; + print "here\n"; + die "success if preceded by 'thread died...'"; + print "shouldn't get here\n"; +}; + +print "joining...\n"; +@r = eval { $t->join; }; +if ($@) { + print "thread died with message: $@"; +} else { + print "thread failed to die successfully\n"; +} |