ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/attributes
(Generate patch)

Comparing Coro/eg/attributes (file contents):
Revision 1.2 by root, Sun Jul 15 02:35:52 2001 UTC vs.
Revision 1.3 by root, Mon Jul 23 02:14:19 2001 UTC

5$p = 2; 5$p = 2;
6 6
7sub p1 : Coro { 7sub p1 : Coro {
8 for (0..9) { 8 for (0..9) {
9 print "p1: $_\n"; 9 print "p1: $_\n";
10 yield; 10 cede;
11 } 11 }
12 $p--; 12 $p--;
13} 13}
14 14
15sub p2 : Coro { 15sub p2 : Coro {
16 for (10..23) { 16 for (10..23) {
17 print "p2: $_\n"; 17 print "p2: $_\n";
18 yield; 18 cede;
19 } 19 }
20 $p--; 20 $p--;
21} 21}
22 22
23eval { 23eval {
24 yield while $p; 24 cede while $p;
25}; 25};
26 26
27 27
28 28

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines