ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/staticperl/perl/ext/Thread/die2.tx
Revision: 1.1
Committed: Thu Jun 30 14:27:05 2005 UTC (21 years, 3 months ago) by root
Branch: MAIN
CVS Tags: PERL-5-8-7, HEAD
Branch point for: PERL
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 BEGIN {
2     eval { require Config; import Config };
3     if ($@) {
4     print "1..0 # Skip: no Config\n";
5     exit(0);
6     }
7     }
8    
9     use 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    
18     print "joining...\n";
19     @r = eval { $t->join; };
20     if ($@) {
21     print "thread died with message: $@";
22     } else {
23     print "thread failed to die successfully\n";
24     }