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

Comparing Coro/Coro.pm (file contents):
Revision 1.84 by root, Sat Nov 25 00:40:26 2006 UTC vs.
Revision 1.85 by root, Sat Nov 25 00:56:35 2006 UTC

184 184
185=cut 185=cut
186 186
187sub async(&@) { 187sub async(&@) {
188 my $pid = new Coro @_; 188 my $pid = new Coro @_;
189 $manager->ready; # this ensures that the stack is cloned from the manager
190 $pid->ready; 189 $pid->ready;
191 $pid; 190 $pid
192} 191}
193 192
194=item schedule 193=item schedule
195 194
196Calls the scheduler. Please note that the current process will not be put 195Calls the scheduler. Please note that the current process will not be put
235by calling the ready method. 234by calling the ready method.
236 235
237=cut 236=cut
238 237
239sub _new_coro { 238sub _new_coro {
240# $current->_clear_idle_sp; # set the idle sp on the following cede 239 $current->_clear_idle_sp; # set the idle sp on the following cede
241 _set_cede_self; # ensures that cede cede's us first 240 _set_cede_self; # ensures that cede cede's us first
242 cede; 241 cede;
243 terminate &{+shift}; 242 terminate &{+shift};
244} 243}
245 244

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines