ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/t/01_process.t
(Generate patch)

Comparing Coro/t/01_process.t (file contents):
Revision 1.9 by root, Sat Apr 19 19:07:46 2008 UTC vs.
Revision 1.10 by root, Thu Nov 20 06:28:52 2008 UTC

1$|=1; 1$|=1;
2print "1..9\n"; 2print "1..13\n";
3 3
4use Coro; 4use Coro;
5 5
6async { 6async {
7 print "ok 2\n"; 7 print "ok 2\n";
33 33
34cede; cede; 34cede; cede;
35 35
36print "ok 9\n"; 36print "ok 9\n";
37 37
38{
39 my $as1 = async {
40 print "not ok 10\n";
41 };
42
43 my $as2 = async {
44 print "ok 10\n";
45 $as1->cancel;
46 };
47
48 $as2->cede_to;
49}
50
51{
52 my $as1 = async {
53 print "not ok 11\n";
54 };
55
56 my $as2 = async {
57 print "ok 11\n";
58 $as1->cancel;
59 cede;
60 print "ok 12\n";
61 $Coro::main->ready;
62 $Coro::main->throw ("exit");
63 };
64
65 local $SIG{__DIE__} = sub {
66 print "ok 13\n";
67 exit if $@ eq "exit";
68 };
69
70 $as2->schedule_to;
71}
72
73print "not ok 12\n";
74

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines