O
Olaf Rabbachin
Hi folks,
I have an application with a separate thread that copies files between
directories. In the GUI-thread, I have a FileSystemWatcher running that
monitors the target-directory the second thread copies the files into and
processes those files. However, some files will take longer than others to
process, but they still need to be processed in the order they were
created. Is there a way of "locking" the FSW's .Created-event so that
subsequent calls would wait until a possibly running event has finished?
I thought that using Monitor.Enter/Monitor.Exit would do the trick, but it
doesn't ... :-(
Thanks for any suggestions!
Cheers,
Olaf
I have an application with a separate thread that copies files between
directories. In the GUI-thread, I have a FileSystemWatcher running that
monitors the target-directory the second thread copies the files into and
processes those files. However, some files will take longer than others to
process, but they still need to be processed in the order they were
created. Is there a way of "locking" the FSW's .Created-event so that
subsequent calls would wait until a possibly running event has finished?
I thought that using Monitor.Enter/Monitor.Exit would do the trick, but it
doesn't ... :-(
Thanks for any suggestions!
Cheers,
Olaf