on Regular Files?

Paul Wright -$P-W$- at
Thu Mar 7 10:49:11 CET 2002

In article <a678ud$30dv$1 at>,
Jim Dennis <jimd at> wrote:
> O.K. so what can I do for asynchronous I/O notification on 
> regular files?  How can I efficiently block and wake up when
> I/O is available on any of my file descriptors?  
> Don't tell me I have to go into a sleep and poll stat() or
> seek() loop!  It's hard to imagine that UNIX got this far 
> without offering a better solution than that!

If you run strace on "tail -f somefile", you'll find that sleeping and
stat'ing is what it's doing, so I don't think there's a better way.

Paul Wright | |

More information about the Python-list mailing list