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

Comparing Coro/Coro.pm (file contents):
Revision 1.182 by root, Fri May 9 22:29:05 2008 UTC vs.
Revision 1.183 by root, Fri May 9 23:50:07 2008 UTC

612 612
613If your handler does not plan to block (e.g. simply sends a message to 613If your handler does not plan to block (e.g. simply sends a message to
614another coroutine, or puts some other coroutine into the ready queue), 614another coroutine, or puts some other coroutine into the ready queue),
615there is no reason to use C<unblock_sub>. 615there is no reason to use C<unblock_sub>.
616 616
617Note that you also need to use C<unblock_sub> for any other callbacks that
618are indirectly executed by any C-based event loop. For example, when you
619use a module that uses L<AnyEvent> (and you use L<Coro::AnyEvent>) and it
620provides callbacks that are the result of some event callback, then you
621must not block either, or use C<unblock_sub>.
622
617=cut 623=cut
618 624
619our @unblock_queue; 625our @unblock_queue;
620 626
621# we create a special coro because we want to cede, 627# we create a special coro because we want to cede,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines