By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,556 Members | 1,448 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,556 IT Pros & Developers. It's quick & easy.

Easy Thread Question

P: n/a
I dont know much about threads, so please be easy on explaining me this one.

How do I stop a thread completelly (kill it)?

What happens with a thread that has been started but not killed?

The reason I am asking this is that one of my applications does not removed
from the Task Manager even though I close all my forms and call explicitly
Applicaton.exit at the end. I was thingking the thread inside it might be
the reason. If not, what else could be the reason it just stays hanging in
the Task Manager?

Thank you,

--
Dino Buljubasic
Software Developer
http://rivusglobal.com
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
hi, i used to have this kinda problem but after i use

(assumming you are writing windows form application)
Private Sub form1_Closed(ByVal sender As Object, ByVal e
As System.EventArgs) Handles MyBase.Closed
End
End Sub

everything terminate properly....
-----Original Message-----
I dont know much about threads, so please be easy on explaining me this one.
How do I stop a thread completelly (kill it)?

What happens with a thread that has been started but not killed?
The reason I am asking this is that one of my applications does not removedfrom the Task Manager even though I close all my forms and call explicitlyApplicaton.exit at the end. I was thingking the thread inside it might bethe reason. If not, what else could be the reason it just stays hanging inthe Task Manager?

Thank you,

--
Dino Buljubasic
Software Developer
http://rivusglobal.com
.

Nov 20 '05 #2

P: n/a
Cor
Dino,
I thought that threads are not killed directly is by design (if it is not a
real crazy thing), the framework kills it after a while.
The "thread".abort exist. But that does not remove it direct from memory.
Why the program not is clossing, is for me impossible to see from here.
Cor
Nov 20 '05 #3

P: n/a
That is what I thought too but it is the only possible problem I can see.

It is closing, all my forms get closed, but the blue square in IDE tool menu
is still shown and the application is still in Task Manager.

Thanks for your help

--
Dino Buljubasic
Software Developer
http://rivusglobal.com

"Cor" <no*@non.com> wrote in message
news:3f***********************@reader21.wxs.nl...
Dino,
I thought that threads are not killed directly is by design (if it is not a real crazy thing), the framework kills it after a while.
The "thread".abort exist. But that does not remove it direct from memory.
Why the program not is clossing, is for me impossible to see from here.
Cor

Nov 20 '05 #4

P: n/a
Hello,

"Dino M. Buljubasic" <di*************@rivusglobal.com> schrieb:
How do I stop a thread completelly (kill it)?

What happens with a thread that has been started but not
killed?

[...]

You may want to set a boolean flag that is checked by the tread before
exitting. This flag will tell the thread to exit. 'Thread.Abort' usually
should not be used, the thread should kill itself.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.