advice for tailing a file
Vikas N Kumar
vikas at vikaskumar.org
Mon Dec 14 23:29:30 CET 2015
On 12/14/2015 05:21 PM, Scott Wiersdorf wrote:
> This module seems promising... but I was hoping for some kind of
> platform independent way to do this (it will eventually be deployed on
> Linux probably most of the time, but with a possibility of BSD, and my
> development is done on a Mac).
For a platform independent way, AnyEvent based I/O read events are the
best. Your development system is a Mac which will most likely have an
SSD and that will have a different read/write performance compared to a
SATA drive or if a Linux/BSD VM then a virtual drive whose performance
depends on the underlying system and the VM hypervisor.
The best way to be platform agnostic is to let the OS handle the I/O
portion and call your event handler. This takes care of any latencies
that you will experience on different systems.
If you want to check whether 10 seconds have passed, use the system
clock or a timer event in tandem.
--Vikas
More information about the anyevent
mailing list