AnyEvent-MPRPC

 view release on metacpan or  search on metacpan

lib/AnyEvent/MPRPC/Client.pm  view on Meta::CPAN


=over 4

=item Either you're in a main program,

Main programs are "allowed to call C<recv> blockingly", according to the
author of L<AnyEvent>.

=item or you're in a Coro + AnyEvent environment.

When you call C<recv> inside a coroutine, only that coroutine is blocked
while other coroutines remain active.  Thus, the program as a whole is
still responsive.

=back

If you're not using Coro, and you don't want your whole program to block,
what you should do is call C<cb> on the condvar, and give it a coderef to
execute when the results come back.  The coderef will be given a condvar
as a parameter, and it can call C<recv> on it to get the data.  The final
example in the SYNOPSIS gives a brief example of this.

xt/01_podspell.t  view on Meta::CPAN

Str
blockingly
callback
condvar
condvars
occured
unix
Daisuke
KAYAC
Murase
coroutine
TCP



( run in 0.240 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )