473,224 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Threading Windows

Using VS 2003, VB.NET, MSDE ...

I am surprised that certain things are creating threads listed in debugging
threading window (with no name or information, just the ID).

For example, the opening an SQL connection creates a thread, that remains
after the connection is closed. Such as the line below.
' test that SQL server is functioning by opening connnection. Note
that this tries repeatedly, so there is a delay before it errors out if it
is unavailable.

CD_Temp.Cnn_For_CSolutionDatabaseSQL.Open()

The name of the thread before and after the .OPEN line above is
"Main_Thread" (as expected), but in the threads window after the .OPEN line
it adds a new thread that says:

ID Name Location Priority

736 <No Name> (blank) Highest

Why is this created? Can I/Should I .abort the thread (I don't see how)?
Should I worry about it? Will garbage collection eventually get rid of it
anyway?

Does .NET create its own threads to do things (such as above) behind the
scenes, or do threads have to be explictly created in code? (obvisouly,
based on this post, I guess the first part or that statement is accurate).

Thanks

Bob


Nov 20 '05 #1
4 790
In article <u6**************@TK2MSFTNGP10.phx.gbl>, Bo****@TouchTalk.net
says...
Why is this created? Can I/Should I .abort the thread (I don't see how)?
Should I worry about it? Will garbage collection eventually get rid of it
anyway?
Why created -- who knows. It's part of the implementation. And no, I
wouldn't worry about it. And no, if it's not your thread you shoulnd't
abort it (in fact, you might not even have permission to abort a thread
that isn't yours).
Does .NET create its own threads to do things (such as above) behind the
scenes, or do threads have to be explictly created in code? (obvisouly,
based on this post, I guess the first part or that statement is accurate).


Yes, .NET creates a thread for the garbage collector and it might create
an additional one for the finalizer queue (not sure on this one though).

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #2
Hi Bob,

Thanks for posting in the community.

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you observe that when you do a
connecting to a SQL server, there will be a new thread created.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

I agree with Patrick's answer, I think for performance concern, the .NET
runtime will create such thread to improve the performance and you do not
need to abort them, .NET runtime will manage it.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #3
Hi Bob,

Thanks for posting in the community.

Did my reply answer your question?
I would appreciate if you could provide an update by posting a message in
the Newsgroup thread letting us know whether the information provided in
the response was useful in resolving the issue. If you still have
questions, please reply to the thread to let us know you need further
assistance.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #4
Yes, the problem is resolved. Thanks for your help.
Bob
"Peter Huang" <v-******@online.microsoft.com> wrote in message
news:uE**************@cpmsftngxa07.phx.gbl...
Hi Bob,

Thanks for posting in the community.

Did my reply answer your question?
I would appreciate if you could provide an update by posting a message in
the Newsgroup thread letting us know whether the information provided in
the response was useful in resolving the issue. If you still have
questions, please reply to the thread to let us know you need further
assistance.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Jorge Godoy | last post by:
Hi! I must have been searching in the wrong places or with the wrong keywords but I couldn't find out how to implement something such as what is done by the threading module on Windows (95, 98...
6
by: CK | last post by:
I have the following code in a windows service, when I start the windows service process1 and process2 work fine , but final process (3) doesnt get called. i stop and restart the windows service...
13
by: RCS | last post by:
I have a UI that needs a couple of threads to do some significant processing on a couple of different forms - and while it's at it, update the UI (set textboxes, fill in listviews). I created a...
7
by: Terry Olsen | last post by:
I run this code: Private Sub p_recv(ByVal sender As Object, ByVal e As SerialReceivedEventArgs) Handles p.ReceivedEvent txtRecv.Text += p.ReadExisting End Sub I get this error: ...
0
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks...
6
by: hzgt9b | last post by:
Using VS 2003, .NET: I developed a windows application that performs several actions based on an input file. The application displays a progress bar as each action executes. Based on new...
17
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. ...
0
by: kingcrowbar.list | last post by:
Hello Everyone I have been playing a little with pyGTK and threading to come up with simple alert dialog which plays a sound in the background. The need for threading came when in the first...
7
by: Mike P | last post by:
I am trying to write my first program using threading..basically I am moving messages from an Outlook inbox and want to show the user where the process is up to without having to wait until it has...
19
by: frankiespark | last post by:
Hello all, I was perusing the internet for information on threading when I came across this group. Since there seems to be a lot of good ideas and useful info I thought I'd pose a question. ...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.