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.186 by root, Sun May 25 01:32:36 2008 UTC

66 66
67our $idle; # idle handler 67our $idle; # idle handler
68our $main; # main coroutine 68our $main; # main coroutine
69our $current; # current coroutine 69our $current; # current coroutine
70 70
71our $VERSION = 4.6; 71our $VERSION = '4.72';
72 72
73our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); 73our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub);
74our %EXPORT_TAGS = ( 74our %EXPORT_TAGS = (
75 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], 75 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)],
76); 76);
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