CPU friendly infinite loop
To avoid the infinity loop simply use a WaitHandle. To let the process be exited from the outer world use a EventWaitHandle with a unique string. Below is an example. If you start it the first time, it simple prints out a message every 10 seconds. If you start in the mean time a second … Read more