473,326 Members | 2,076 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,326 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 791
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. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.