Is there a way to Interupt a sleeping thread? If I have code similar to this.
while(true){
if(DateTime.Now.Subtract(_lastExecuteTime).TotalHours > 1)
Can't you just wrap your Thread.Sleep portion in a loop so that it loops 60 times then makes the other check? Of course all this does is trades off a simple if(somethingIndicatingQuit) versus the DateTIme if check, but assuming maybe you're real code does something more expensive, having a second loop could offer some minor CPU savings.