ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/attributes
Revision: 1.1
Committed: Tue Jul 10 01:43:21 2001 UTC (22 years, 11 months ago) by root
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/usr/bin/perl
2    
3     use Coro::Process;
4    
5     $p = 2;
6    
7     sub p1 : Coro {
8     for (0..9) {
9     print "p1: $_\n";
10     yield;
11     }
12     $p--;
13     }
14    
15     sub p2 : Coro {
16     for (10..23) {
17     print "p2: $_\n";
18     yield;
19     }
20     $p--;
21     }
22    
23     eval {
24     yield while $p;
25     };
26    
27    
28