Re: filewatcher question

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Dec 17, 10:34 am, "GS" <gsmsnews.microsoft.co...@xxxxxxxxxxxxxxxxx>
wrote:
I seem to get two file watcher changed invocation for a file change. I
thought may be the cause is third party software effect the change

I checked the general attributes of the files, it clearly shows the original
created date and new modified date time.. I also tried notepad on the file
and click File-> save. I still get two invocation of the file changed event

so what gives. does that mean I would have to save the last modified date
time and size of the file I am watching to guard against the being invoked
twice for the same change?

if so, what would be the best approach to minimize to application if I
were to watch for say 40000 files in 10 folders?. there will be simple
filters and check for subfolders and files being ignored from a list

I guess I can get the file watcher change event to just queue up the file
spec, along creation date time, modified date time and let a worker thread
to do the grunt work of whatever needed to deal with the file changes.

Furthermore the file watcher changed event will do a quick look up if the
change belongs to the same change from early call and ignore the change..

do I need to be concerned about looking up in the queue for same change
when there are about 50 to 100 items in the queue?.

any reference to thread safe list or queue sharing? I am new to thread
safety.. I will also have to look up thread safe GUI as well

With the multiple event fires, this seems relevant:

http://weblogs.asp.net/ashben/archive/2003/10/14/31773.aspx
.



Relevant Pages

  • filewatcher question
    ... I seem to get two file watcher changed invocation for a file change. ... I guess I can get the file watcher change event to just queue up the file ... I will also have to look up thread safe GUI as well ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Thread safe vector class
    ... > between worker threads and the main thread. ... producer/consumer queue. ... If that one doesn't fit your needs, Google for "thread safe producer ...
    (microsoft.public.vc.language)
  • Re: Thread safe queue in C
    ... within linux with C and i need a thread safe queue.How can i obtain a ... Anyway, creating a queue with POSIX Threads is rather trivial, I don't see why you can't quickly create one: ... typedef struct queue_s queue; ... queue* const _this, ...
    (comp.programming.threads)
  • Re: EventMachine.defer and ActiveRecord connection pool?
    ... up connections to the ActiveRecord connection pool and you are running ... request to a Queue (thread safe). ... its task it pops the next one off the queue. ... The whole purpose of @@running hash is to ensure that same task won't be ...
    (comp.lang.ruby)
  • Re: Im trying to use FileSystemWatcher
    ... So i create a file queue and a timer ... I've tried listening to the Created event, as well as the Changed event ...
    (microsoft.public.dotnet.languages.csharp)