M
mfc
I have code like so :-
try {
while (true) {
ProcessInQueue();
try {
Thread.Sleep(Timeout.Infinite);
} catch (ThreadInterruptedException) {
}
}
} catch (ThreadAbortException) {
}
but when i interrupt the thread, i get the ThreadInterruptedException thrown
in the ProcessInQueue(). There are no sleep or wait statements in
ProcessInQueue() that i have put in, ProcessInQueue() does call api
functions that may be making the thread sleep or wait. How can i get around
this problem? I don't want ProcessInQueue() interrupted.
try {
while (true) {
ProcessInQueue();
try {
Thread.Sleep(Timeout.Infinite);
} catch (ThreadInterruptedException) {
}
}
} catch (ThreadAbortException) {
}
but when i interrupt the thread, i get the ThreadInterruptedException thrown
in the ProcessInQueue(). There are no sleep or wait statements in
ProcessInQueue() that i have put in, ProcessInQueue() does call api
functions that may be making the thread sleep or wait. How can i get around
this problem? I don't want ProcessInQueue() interrupted.