threading using filewatcher object




I have a file watcher object which i use to check a directory for XML

When an XML file is placed in the directory i check the filename, to
make sure it for me, then parse the XML and depending on whats in it,
write an XML file back to the same directory.

Now i have this all working, but i thought the best thing i could do is
create a new thread each time the create event is fired in my file
watcher object, BUT am awful with threads, any ideas on what would be
the best approach for this?

Am i right in thinking that i would need to create a method in my class
which matches the threading delegate, e.g

public void mymethod()


and then do everything within this method?

any help would be great

thanks in advance


Samuel R. Neff

FileWatcher is inherintly multithreaded so you don't need to do
anything. Whenever FileWatcher detects a change, it triggers your
callback on a threadpool thread.



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

Similar Threads

FileWatcher 3
XML reader/write 2
filewatcher question 4
polling 3
multiple settings files 4
Windows Services - FileWatcher 4
Perfomance using threading 5
Populating objects from XML file 4