Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

 

How can I terminate a thread say T1 by another thread which I already started say T2? Or in general how can I control one thread using other threads?

Posted

Look at the System.Threading.Thread class.

 

Abort, Interrupt, Join, Start and Suspend methods allow you to do things to start/pause/stop and synchronize with that thread.

 

So to terminate a thread first call Abort on the Thread object to make it stop, then call Join to wait until it actually stopped.

Nothing is as illusive as 'the last bug'.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...