R
Rob Oldfield
I have an app that seems to be fine at the moment, but I'm a little worried
that I'm setting myself up to run into a brick wall. The basic outline of
the code is that a FileSystemWatcher keeps an eye on a folder, when a file
appears, it gets processed. Processing takes around 5 seconds.
My potential problem is that files can get created in the folder every two
seconds.... so while the code is processing the first file then the second
turns up. In testing, I haven't managed to break it yet by dumping lots of
files into the folder at the same time.... but should I be doing something
like using threading to handle each occurence of the code? In practical
terms... this is an app that is used internally by my firm and I would doubt
if there would ever be more than 5 files created at one time (i.e. over 10
seconds).
Any thoughts?
that I'm setting myself up to run into a brick wall. The basic outline of
the code is that a FileSystemWatcher keeps an eye on a folder, when a file
appears, it gets processed. Processing takes around 5 seconds.
My potential problem is that files can get created in the folder every two
seconds.... so while the code is processing the first file then the second
turns up. In testing, I haven't managed to break it yet by dumping lots of
files into the folder at the same time.... but should I be doing something
like using threading to handle each occurence of the code? In practical
terms... this is an app that is used internally by my firm and I would doubt
if there would ever be more than 5 files created at one time (i.e. over 10
seconds).
Any thoughts?