SystemFileWatcher question

  • Thread starter Thread starter bill salkin
  • Start date Start date
B

bill salkin

I'm concered with the CPU load that a FileSystemWatcher
instance can cause. Is there a way to have the 'Watcher
check for a new file evry 5 or 10 seconds?

Bill
 
The FileSystemWatcher works by hooking system-level events, so it's already
efficient. However, you don't have to handle the events it raises
immediately--you can put them into a queue and handle them periodically,
based on a timer as you suggest, or during application idle time, or
whatever you need.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top