ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/State.pm
(Generate patch)

Comparing Coro/Coro/State.pm (file contents):
Revision 1.53 by root, Fri Nov 3 00:56:02 2006 UTC vs.
Revision 1.54 by root, Fri Nov 24 11:36:57 2006 UTC

90 }; 90 };
91 print STDERR $@ if $@; 91 print STDERR $@ if $@;
92 _exit 255; 92 _exit 255;
93} 93}
94 94
95sub new {
96 my $class = shift;
97 my $proc = shift || sub { die "tried to transfer to an empty coroutine" };
98 bless _newprocess [$proc, @_], $class;
99}
100
101=item $prev->transfer ($next, $flags) 95=item $prev->transfer ($next, $flags)
102 96
103Save the state of the current subroutine in C<$prev> and switch to the 97Save the state of the current subroutine in C<$prev> and switch to the
104coroutine saved in C<$next>. 98coroutine saved in C<$next>.
105 99

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines