Threading Problem

  • Thread starter Thread starter john
  • Start date Start date
J

john

Waqas

when i am using Thread.abort() and Thread.suspend(). the background process
is not stopped. it runs continiously. i have checked the thread state from
Thread windows its is in suspended state.

Programming Language C#.Net
Framework 2.0
 
These are not nice methods to end your thread with. In MSDN it is said for
abort
"Calling this method USUALLY terminates the thread.".

There is also some interaction between .abort and .suspend, that is probably
doing this to you. To quote "A ThreadAbortException is not thrown in the
suspended thread until Resume is called.".

There are few more interactions - check in MSDN.

General word is not using .abort to control your thread.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top