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

Comparing Coro/Coro.pm (file contents):
Revision 1.83 by root, Fri Nov 24 15:34:33 2006 UTC vs.
Revision 1.84 by root, Sat Nov 25 00:40:26 2006 UTC

234called. To make the process run you must first put it into the ready queue 234called. To make the process run you must first put it into the ready queue
235by calling the ready method. 235by calling the ready method.
236 236
237=cut 237=cut
238 238
239sub _newcoro { 239sub _new_coro {
240# $current->_clear_idle_sp; # set the idle sp on the following cede
241 _set_cede_self; # ensures that cede cede's us first
242 cede;
240 terminate &{+shift}; 243 terminate &{+shift};
241} 244}
242 245
243sub new { 246sub new {
244 my $class = shift; 247 my $class = shift;
245 248
246 $class->SUPER::new (\&_newcoro, @_) 249 $class->SUPER::new (\&_new_coro, @_)
247} 250}
248 251
249=item $process->ready 252=item $process->ready
250 253
251Put the given process into the ready queue. 254Put the given process into the ready queue.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines