| delink@gmail.com 2006-01-28, 6:58 pm |
| Jim Gibson wrote:
> In article <slrndtkfhp.asg.glenn-nntp@ziegchen.delink.net>, Brian T
> Glenn <glenn-nntp@this.delink.is.net.invalid> wrote:
>
[snip code][color=darkred]
>
> Yes, since can_read is not blocking, there must be data ready to read
> on the FIFO. If you don't actually read the data from the FIFO, then it
> will still be ready the next time you call can_read. Try reading the
> data:
>
> print <$fh>;
This was my problem. In my quick attempt to test the loop, I forgot to
actually read the data, causing it to spin. Thanks for pointing out the
seemingly obvious to me.
>
> can_read will either return an empty list or a list with $fifo as its
> only element. There is no way you can ever print "Receiving a message
> from another source".
It is actually possible in the grand scheme of the code as extra
filehandles will be added as messages come into the FIFO, but the way
it is currently written, that is correct.
Thank you for the help,
Brian
|