AnyEvent::Fork::RPC::event not propagating to parent
Art Sackett
asackett at gmx.com
Wed Jan 11 16:37:40 CET 2017
On Wed, Jan 11, 2017 at 08:37:44AM +0100, Marc Lehmann wrote:
> while (<$tail_fh>) {
>
> This is an endless loop, so you never return. And since your event handle
> doesn't return, the event loop won't run, and the event will not be sent.
Thanks for the thoughtful explanation of my massive thinko. While
camping on a filehandle late one night I bumped into a blocked loop...
> One option would be to recognize that the example program doesn't need the
> async backend, because it itself isn't "async", it's blocking.
The code destined for actual use is a mite smarter 'n that -- because
you wrote most of it. It's using Linux::Inotify2, AnyEvent, and IO::AIO.
The funny part: I'd thought that I'd leave the part that the 'tail -F'
was supposed to emulate until later because it's something I know well
and I was eager to get into the newer, funner stuff. Oops.
Thanks again, and be well!
--
Art Sackett
http://www.artsackett.com/
More information about the anyevent
mailing list