G
Guest
I have C# application, in main form I made thead...
User click on susspend button which cause to suspend the thread, in the
button fuction:
mThread.Susspend();
What I should do to wait in this function untile the thread become
susspended ?
I tried the following ,but not work I tried Sleep but this cause to sleep
all the threads?, why?
mThread.Susspend();
do
{
if((mThread.ThreadState &
(System.Threading.ThreadState.Suspended))==Threading.ThreadState.Suspended)
{
break;
}
//Why this also Sleep all threads?????????
Thread.Sleep(200);
}
while (true);
User click on susspend button which cause to suspend the thread, in the
button fuction:
mThread.Susspend();
What I should do to wait in this function untile the thread become
susspended ?
I tried the following ,but not work I tried Sleep but this cause to sleep
all the threads?, why?
mThread.Susspend();
do
{
if((mThread.ThreadState &
(System.Threading.ThreadState.Suspended))==Threading.ThreadState.Suspended)
{
break;
}
//Why this also Sleep all threads?????????
Thread.Sleep(200);
}
while (true);