How to limit the number of instances of an application.
I am writing a simple folder watch service using C#.
This will monitor a folder for a .xml file and launch another application with that file as input parameter. Currently, in its vanilla flavour, it launchees the other application as soon as a file is dropped in the hot folder. This happens even when one file is being processed.
Is there a way I can limit the number of instances of the other application launched by the service?