Abort a suspended thread
-
Hi, How can a suspended thread can abort. Thankyou YPKI
-
Hi, How can a suspended thread can abort. Thankyou YPKI
Hi, According to the documentation and the compiler warnings you must be getting Thread.Suspend is obsolete since .NET 2.0; you should not use it any longer. FWIW: To abort, you should undo the suspension, hence try Thread.Resume first. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
Hi, How can a suspended thread can abort. Thankyou YPKI
try
{
yourThread.Abort();
}
catch (ThreadStateException e)
{
yourThread.Resume();
} -
Hi, According to the documentation and the compiler warnings you must be getting Thread.Suspend is obsolete since .NET 2.0; you should not use it any longer. FWIW: To abort, you should undo the suspension, hence try Thread.Resume first. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
You could undo it after. See my reply.