Tail without polling
I have another application that is writing to a file. I want to get the new contents that are written ASAP, in sub-second time. I've searched around and found tail implementations but as far as I can tell they all poll. That means I'd be in a spin loop polling constantly and completely consuming the CPU. I'd rather not do that.
Is there some way to get notified of new data written to a file without polling? Block on it until there's new data?
I'm on Windows Vista, JDK 1.6
That sounds like OS specific code that would require JNI to get to the event you want to catch.