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

Comparing Coro/Coro.pm (file contents):
Revision 1.152 by root, Sun Oct 7 13:53:37 2007 UTC vs.
Revision 1.162 by root, Wed Dec 12 19:09:33 2007 UTC

57 57
58our $idle; # idle handler 58our $idle; # idle handler
59our $main; # main coroutine 59our $main; # main coroutine
60our $current; # current coroutine 60our $current; # current coroutine
61 61
62our $VERSION = '4.1'; 62our $VERSION = '4.31';
63 63
64our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); 64our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub);
65our %EXPORT_TAGS = ( 65our %EXPORT_TAGS = (
66 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], 66 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)],
67); 67);
309 309
310"Cede" to other coroutines. This function puts the current coroutine into the 310"Cede" to other coroutines. This function puts the current coroutine into the
311ready queue and calls C<schedule>, which has the effect of giving up the 311ready queue and calls C<schedule>, which has the effect of giving up the
312current "timeslice" to other coroutines of the same or higher priority. 312current "timeslice" to other coroutines of the same or higher priority.
313 313
314Returns true if at least one coroutine switch has happened.
315
316=item Coro::cede_notself 314=item Coro::cede_notself
317 315
318Works like cede, but is not exported by default and will cede to any 316Works like cede, but is not exported by default and will cede to any
319coroutine, regardless of priority, once. 317coroutine, regardless of priority, once.
320
321Returns true if at least one coroutine switch has happened.
322 318
323=item terminate [arg...] 319=item terminate [arg...]
324 320
325Terminates the current coroutine with the given status values (see L<cancel>). 321Terminates the current coroutine with the given status values (see L<cancel>).
326 322
632 628
633Event/IO: L<Coro::Timer>, L<Coro::Event>, L<Coro::Handle>, L<Coro::Socket>. 629Event/IO: L<Coro::Timer>, L<Coro::Event>, L<Coro::Handle>, L<Coro::Socket>.
634 630
635Compatibility: L<Coro::LWP>, L<Coro::Storable>, L<Coro::Select>. 631Compatibility: L<Coro::LWP>, L<Coro::Storable>, L<Coro::Select>.
636 632
637Embedding: L<Coro:MakeMaker>. 633Embedding: L<Coro::MakeMaker>.
638 634
639=head1 AUTHOR 635=head1 AUTHOR
640 636
641 Marc Lehmann <schmorp@schmorp.de> 637 Marc Lehmann <schmorp@schmorp.de>
642 http://home.schmorp.de/ 638 http://home.schmorp.de/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines