diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-18 16:51:04 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-18 16:51:04 +0000 |
commit | 3487771ddbb6a6913db5c4e74398b9812ab6476b (patch) | |
tree | 85b64c0c2b51bf762d04481a974ccb8c4b8cdb38 /ext/Thread | |
parent | a0231f0e83307f241a212cdcb7ecea46e3dbf08c (diff) | |
download | perl-3487771ddbb6a6913db5c4e74398b9812ab6476b.tar.gz |
Bring MANIFEST up to date. Add new thread tests.
p4raw-id: //depot/perl@265
Diffstat (limited to 'ext/Thread')
-rw-r--r-- | ext/Thread/die.t | 16 | ||||
-rw-r--r-- | ext/Thread/die2.t | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/ext/Thread/die.t b/ext/Thread/die.t new file mode 100644 index 0000000000..623940579f --- /dev/null +++ b/ext/Thread/die.t @@ -0,0 +1,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"; +} 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"; +} |