469,568 Members | 1,430 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,568 developers. It's quick & easy.

Easy Thread Question

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
4 2888
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
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
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
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.

Similar topics

5 posts views Thread by Harold Howe | last post: by
5 posts views Thread by AC | last post: by
6 posts views Thread by Matt Long | last post: by
1 post views Thread by melanieab | last post: by
22 posts views Thread by Morpheus | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.