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

Comparing Coro/Coro.pm (file contents):
Revision 1.93 by root, Fri Dec 1 19:41:06 2006 UTC vs.
Revision 1.94 by root, Sat Dec 2 18:01:30 2006 UTC

254 254
255Calling C<exit> in a coroutine will not work correctly, so do not do that. 255Calling C<exit> in a coroutine will not work correctly, so do not do that.
256 256
257=cut 257=cut
258 258
259sub _new_coro { 259sub _run_coro {
260 terminate &{+shift}; 260 terminate &{+shift};
261} 261}
262 262
263sub new { 263sub new {
264 my $class = shift; 264 my $class = shift;
265 265
266 $class->SUPER::new (\&_new_coro, @_) 266 $class->SUPER::new (\&_run_coro, @_)
267} 267}
268 268
269=item $success = $coroutine->ready 269=item $success = $coroutine->ready
270 270
271Put the given coroutine into the ready queue (according to it's priority) 271Put the given coroutine into the ready queue (according to it's priority)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines