ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/attributes
Revision: 1.4
Committed: Fri Jul 14 23:09:51 2017 UTC (6 years, 10 months ago) by root
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
State: FILE REMOVED
Log Message:
*** empty log message ***

File Contents

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