Asynchronous file I/O

Posted by sidseth83 on 2006-11-27 11:20

Hello All.

I have an application that writes to a log file. I would like to read as soon as application writes to log file and process it.
I have used select on Unix platform and it works fine. I could not get it working with windows. It looks like windows only supports asynchronous I/O for sockets and not for regular files (I wish I am wrong here).
Does anyone have any idea how to get asynchronous file I/O working on windows platform, of course using perl.

Thanks,
Shridhar

kevinw
ActiveState Staff
Tue, 2006-11-28 11:01

Hello Shridhar,

select() isn't supported on files on Windows, only on sockets as you've found. This means that the regular async IO module (IO::AIO) isn't going to do the trick. I don't know if there is an alternative interface to async IO for Windows at the C level, but I wasn't able to find one for Perl.

Cheers,

kjw