Re: About File::Monitor



"Jay Savage" <daggerquill@xxxxxxxxx> writes:

Finally, Tom's points are important. How do you *know* that the files
(in this case a single directory) changed *during the sleep*? Do you
know that the output wasn't buffered? That the system didn't delay the
writes for some reason? That you were even watching the files you
thought you were?


Your best bet to make sure the module is working would, instead of
sleeping between scans and trying to modify the watched files from an
external process during a narrow window, would probably be to perform
your initial scan; open one of the watched files for writing; write to
it; flush the buffer; close it; and then rescan.

Sounds like a plan for testing but the end result sought in this case
is a monitor that *will* see changes done by external processes in some
reasonable time frame.

(Assuming for a moment I do get it figured out with the help in this
thread how to use File::Monitor)

How long of a sleep would be required to *KNOW* a change has happened
with something external writing to files? Is there no way to guess
that closely... too many variables may come into play? Or could one
create a monitor that will *know* inside of ten seconds that a file
has been written to?

Would *knowing* about file creation have the same problems? Or is that
something the monitor would *know* for sure quickly?

.



Relevant Pages

  • Re: Requesting advice how to clean up C code for validating string represents integer
    ... spew-text loop, which filled up all modem buffers. ... sleep could be regarded as a "dunzell", ... NonNull return value, Buffer contains chars EOL NUL ...
    (comp.lang.c)
  • Re: Requesting advice how to clean up C code for validating string represents integer
    ... As presented there was no reason for the sleep. ... read the documentation to see what the correct way to do it is ... NonNull return value, Buffer contains chars EOL NUL ...
    (comp.lang.c)
  • vista monitor sleep after some time
    ... Monitor goes to sleep after 2-3 minutes, and come back by moving mouse or any key. ... So seems some issue in vista settings or its a bug. ... It is getting bit annoying that whenever i'm watching a movie, ...
    (microsoft.public.windows.vista.performance_maintenance)
  • Re: Dell Dimension running Vista wont come out of sleep mode
    ... We had the same problem - computer would go to sleep and monitor would not ... I too was using a bluetooth keyboard when this happened, ... Only the computer went to sleep after I ... accidently hit the power button on it. ...
    (microsoft.public.windows.vista.performance_maintenance)
  • Re: Unusual effects in XP Pro setup?
    ... The pattern of behaviour shows stability for a few minutes then blinking or using scroll wheel on mouse induces blinking and eventually sleep on monitor 1. ... after a few minutes into the new config the DVI monitor blinks and goes into sleep mode, As it is set as monitor 1 it means that monitor 2, no matter how great, is merely an extended and bare part of the desktop = difficulties when the DVI monitor goes to sleep ...
    (microsoft.public.windowsxp.general)