select.select() on Regular Files?
Paul Wright
-$P-W$- at verence.demon.co.uk
Thu Mar 7 04:49:11 EST 2002
In article <a678ud$30dv$1 at news.idiom.com>,
Jim Dennis <jimd at vega.starshine.org> 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 | http://pobox.com/~pw201 |
More information about the Python-list
mailing list