How to kill a thread

  • Thread starter Thread starter MWK
  • Start date Start date
M

MWK

Hi All,

I suspect in VC++.Net (managed, VS2003)
MyThread.Abort();
is unable to kill the thread.

It was easy in C#.Net
MyThread.Abort();
MyThread = null;

Does anyone know the way to kill a thread?

Thanks and kind regards,
MWK
 
If the code is same (except for syntactic differences of course), what works
in C# should work in MC++ too.
 
Are you using the code in the same way? It's generally considered that
Abort() is a bit extreme for most purposes, and some kind of exit condition
is preferred. Like Nishant said, what works in C# should work in equivalent
C++ and it it doesn't, it's probably being used differently. If you could
post some code that replicates the problem, someone'll be able to give you
better advice.

Steve
 
Back
Top