Consider the following code snippet:
void MyRunningThread() { while(counter>0)
Suppose I run Thread from the above function.
Now, is it bad to have an infinite loop like this inside Thread? I added Thread.Sleep () with the assumption that context switching to this function will occur at a lower frequency due to Sleep mode and, therefore, reduce the consumption of resources of this Thread.
Can anyone check my scores.
source share