Results 1 to 3 of 3
  1. #1
    taotree is offline Member
    Join Date
    Oct 2008
    Posts
    1
    Rep Power
    0

    Default 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

    Thanks!

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,584
    Rep Power
    23

    Default

    That sounds like OS specific code that would require JNI to get to the event you want to catch.

  3. #3
    agoodic is offline Member
    Join Date
    Oct 2008
    Posts
    1
    Rep Power
    0

    Red face 新加的空白文章3

    这是新加的空白文章3,可以在ubb可视化编辑器中,添加和修改文章内容。

Similar Threads

  1. FrameWork polling
    By nanaji in forum Advanced Java
    Replies: 0
    Last Post: 10-29-2008, 10:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •