C
Curious
Hi,
I have a worker thread running, where basically its operation is to
execute in an infinite loop.
Now, when I am suspending this thread, the CPU usage time is still
remaining 100%.
What could my problem be.
Thread t1 = new Thread(new ThreadStart(myMethod));
Console.Writeline("Press any key to start");
Console.Readline();
running = true;
t1.Start();
Console.Writeline("Press any key to suspend");
Console.Readline();
t1.Suspend();
Console.Readline();
... here CPU usage still 100%
myMethod()
{
while (running == true)
{
I have a worker thread running, where basically its operation is to
execute in an infinite loop.
Now, when I am suspending this thread, the CPU usage time is still
remaining 100%.
What could my problem be.
Thread t1 = new Thread(new ThreadStart(myMethod));
Console.Writeline("Press any key to start");
Console.Readline();
running = true;
t1.Start();
Console.Writeline("Press any key to suspend");
Console.Readline();
t1.Suspend();
Console.Readline();
... here CPU usage still 100%
myMethod()
{
while (running == true)
{
Code:
}
}
Can someone help me out
Thanks in Advance