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

Comparing Coro/Coro.pm (file contents):
Revision 1.228 by root, Thu Nov 20 03:14:49 2008 UTC vs.
Revision 1.229 by root, Thu Nov 20 06:32:55 2008 UTC

391 $self->{_status} = [@_]; 391 $self->{_status} = [@_];
392 $self->_cancel; 392 $self->_cancel;
393 } 393 }
394} 394}
395 395
396=item $coroutine->schedule_to
397
398Puts the current coroutine to sleep (like C<Coro::schedule>), but instead
399of continuing with the next coro from the ready queue, always switch to
400the given coroutine object (regardless of priority etc.). The readyness
401state of that coroutine isn't changed.
402
403This is an advanced method for special cases - I'd love to hear about any
404uses for this one.
405
406=item $coroutine->cede_to
407
408Like C<schedule_to>, but puts the current coroutine into the ready
409queue. This has the effect of temporarily switching to the given
410coroutine, and continuing some time later.
411
412This is an advanced method for special cases - I'd love to hear about any
413uses for this one.
414
396=item $coroutine->throw ([$scalar]) 415=item $coroutine->throw ([$scalar])
397 416
398If C<$throw> is specified and defined, it will be thrown as an exception 417If C<$throw> is specified and defined, it will be thrown as an exception
399inside the coroutine at the next convenient point in time. Otherwise 418inside the coroutine at the next convenient point in time. Otherwise
400clears the exception object. 419clears the exception object.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines