473,387 Members | 1,574 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,387 software developers and data experts.

Thread has exited?

I keep seeing this when I run my program in Visual Studio:

The thread '<No Name>' (0x894) has exited with code 0 (0x0).

What does this mean exactly? It doesn't seem to be causing a problem.

Thanks,

Drew


Nov 15 '05 #1
9 20331
"Drew" <so*****@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
I keep seeing this when I run my program in Visual Studio:

The thread '<No Name>' (0x894) has exited with code 0 (0x0).

What does this mean exactly? It doesn't seem to be causing a problem.


It means exactly what it says.
A thread with ID 0x894 has finished execution and returned 0.
This is normal condition, not a problem.

It means that either you or someone on your behalf created a new
thread of execution, and that thread has just finished.

In C# you create threads using System.Threading.Thread class.

Ivan
Nov 15 '05 #2
Is there any way to tell what generated this thread in the first place?

It doesn't appear to be anything that I created directly.

Could the thread be generated by calling Refresh() on a GUI component?

Drew
"Ivan Krivyakov" <i.***@verizon.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"Drew" <so*****@hotmail.com> wrote in message

news:%2****************@TK2MSFTNGP09.phx.gbl...
I keep seeing this when I run my program in Visual Studio:

The thread '<No Name>' (0x894) has exited with code 0 (0x0).

What does this mean exactly? It doesn't seem to be causing a problem.


It means exactly what it says.
A thread with ID 0x894 has finished execution and returned 0.
This is normal condition, not a problem.

It means that either you or someone on your behalf created a new
thread of execution, and that thread has just finished.

In C# you create threads using System.Threading.Thread class.

Ivan

Nov 15 '05 #3
When you run any program the system creates a thread for it.
Maybe this is simply the thread your program is running on?

"Drew" <so*****@hotmail.com> wrote in message
news:OF**************@TK2MSFTNGP11.phx.gbl...
Is there any way to tell what generated this thread in the first place?

It doesn't appear to be anything that I created directly.

Could the thread be generated by calling Refresh() on a GUI component?

Drew
"Ivan Krivyakov" <i.***@verizon.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"Drew" <so*****@hotmail.com> wrote in message

news:%2****************@TK2MSFTNGP09.phx.gbl...
I keep seeing this when I run my program in Visual Studio:

The thread '<No Name>' (0x894) has exited with code 0 (0x0).

What does this mean exactly? It doesn't seem to be causing a problem.


It means exactly what it says.
A thread with ID 0x894 has finished execution and returned 0.
This is normal condition, not a problem.

It means that either you or someone on your behalf created a new
thread of execution, and that thread has just finished.

In C# you create threads using System.Threading.Thread class.

Ivan


Nov 15 '05 #4
"Drew" <so*****@hotmail.com> wrote in message news:OF**************@TK2MSFTNGP11.phx.gbl...

Is there any way to tell what generated this thread in the first place?

I am not sure.

I guess you can interrupt your program and see what threads are executing
(Debug->Windows->Threads). I know Microsoft Jet database engine (the one
called when you access .MDB files) has habit of creating additional threads.

Could the thread be generated by calling Refresh() on a GUI component?


I doubt it.

Ivan
Nov 15 '05 #5
Except that I see these messages while the program is running.

I would think that if this was the main thread, it would only display
this message upon exiting the program...

I will see if I can isolate where it's coming from.

Drew

"Sharon" <ta*******@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
When you run any program the system creates a thread for it.
Maybe this is simply the thread your program is running on?

"Drew" <so*****@hotmail.com> wrote in message
news:OF**************@TK2MSFTNGP11.phx.gbl...
Is there any way to tell what generated this thread in the first place?

It doesn't appear to be anything that I created directly.

Could the thread be generated by calling Refresh() on a GUI component?

Drew
"Ivan Krivyakov" <i.***@verizon.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"Drew" <so*****@hotmail.com> wrote in message

news:%2****************@TK2MSFTNGP09.phx.gbl...
> I keep seeing this when I run my program in Visual Studio:
>
> The thread '<No Name>' (0x894) has exited with code 0 (0x0).
>
> What does this mean exactly? It doesn't seem to be causing a problem. >

It means exactly what it says.
A thread with ID 0x894 has finished execution and returned 0.
This is normal condition, not a problem.

It means that either you or someone on your behalf created a new
thread of execution, and that thread has just finished.

In C# you create threads using System.Threading.Thread class.

Ivan



Nov 15 '05 #6
Drew, it may be a thread from the thread pool. These threads are created and
destroyed dynamically. Operations that are asynchronous often are completed
on a threadpool thread, such as network operations and timers.

If you are creating threads yourself you can give each one a name by setting
the Name property of the thread object; when the thread is destroyed it will
report the name. If it is a threadpool thread then it will not have a name.
"Drew" <so*****@hotmail.com> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
Except that I see these messages while the program is running.

I would think that if this was the main thread, it would only display
this message upon exiting the program...

I will see if I can isolate where it's coming from.

Drew

"Sharon" <ta*******@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
When you run any program the system creates a thread for it.
Maybe this is simply the thread your program is running on?

"Drew" <so*****@hotmail.com> wrote in message
news:OF**************@TK2MSFTNGP11.phx.gbl...
Is there any way to tell what generated this thread in the first place?
It doesn't appear to be anything that I created directly.

Could the thread be generated by calling Refresh() on a GUI component?

Drew
"Ivan Krivyakov" <i.***@verizon.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> "Drew" <so*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> > I keep seeing this when I run my program in Visual Studio:
> >
> > The thread '<No Name>' (0x894) has exited with code 0 (0x0).
> >
> > What does this mean exactly? It doesn't seem to be causing a problem. > >
>
> It means exactly what it says.
> A thread with ID 0x894 has finished execution and returned 0.
> This is normal condition, not a problem.
>
> It means that either you or someone on your behalf created a new
> thread of execution, and that thread has just finished.
>
> In C# you create threads using System.Threading.Thread class.
>
> Ivan
>
>



Nov 15 '05 #7
Dave <no****************@wi.rr.com> wrote:
Drew, it may be a thread from the thread pool. These threads are created and
destroyed dynamically. Operations that are asynchronous often are completed
on a threadpool thread, such as network operations and timers.


But the point of a threadpool thread (in the current implementation) is
that it *doesn't* get destroyed - it hangs around for more work to do.
A more generalised threadpool may indeed create and destroy threads
based on various criteria, but I believe the .NET one just creates a
fixed number (25 per processor?) and leaves them there waiting for
work.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #8
> Drew, it may be a thread from the thread pool. These threads are created
and
destroyed dynamically. Operations that are asynchronous often are completed on a threadpool thread, such as network operations and timers.


OK then it's probably a thread from the network connection I created inside
my own
thread. I did give my own thread a name and I can see when that stops
running.

However, I'm using the GetResponse method from HttpWebRequest and the docs
state that this method is synchronous. Does this also mean that it is non
blocking?

Actually, I think I would prefer that the connection would block until some
data
is received or a timeout exception occurs. Can I specify this with
HttpWebRequest?

Regards,

Drew
Nov 15 '05 #9

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Dave <no****************@wi.rr.com> wrote:
Drew, it may be a thread from the thread pool. These threads are created and destroyed dynamically. Operations that are asynchronous often are completed on a threadpool thread, such as network operations and timers.


But the point of a threadpool thread (in the current implementation) is
that it *doesn't* get destroyed - it hangs around for more work to do.
A more generalised threadpool may indeed create and destroy threads
based on various criteria, but I believe the .NET one just creates a
fixed number (25 per processor?) and leaves them there waiting for
work.


I don't believe that's true - threadpool threads get created only as needed.
I just built a simple test app, queued up some work items, and the thread(s)
got created as I expected but I did not see them get destroyed. I had
thought there was a decay timer associated with each thread, and if enough
time goes by the thread would get destroyed, but either the implementation
changed, I was misinformed, or the conditions for destroying the thread
never occurred.
Our client application makes extensive use of web services, and after some
network traffic we always see the message that threads are getting
destroyed, so I know there is dynamic creation/destruction of threads. I
still believe these are threadpool threads but I would have to do more
investigation to prove it.

Nov 15 '05 #10

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

Similar topics

1
by: chuayongquan | last post by:
i am doing a dll debugging and kept getting this error: The thread 0x880 has exited with code 0 (0x0). then vs c++ gave me memory leak detected and start to memory dump. but i am getting another...
0
by: Carl Rosenberger | last post by:
Hi all, my application does a lot of threading. The output window becomes completely unusable because of all the "thread exited" messages popping up. Is there any way to stop them? ...
7
by: Ivan | last post by:
Hi I have following problem: I'm creating two threads who are performing some tasks. When one thread finished I would like to restart her again (e.g. new job). Following example demonstrates...
0
by: c# newbie | last post by:
When starting a c# asp.net web site in visual studio 2003, the following message appears in the debugger window: The thread 0x7bc has exited with code 0 (0x0). The program ' IEXPLORE.EXE:...
0
by: Sir Spamallot | last post by:
Hi there, Previously when handling the termination of threads I had just called the abort method and caught it in a try catch block in the thread callback. After recently learning that this was...
2
by: Gunnar_Frenzel | last post by:
Hello, I have an application running some threads which all get a name using the Name property. In Visual Studio 2003 when a thread exited the name is displayed in the "The thread foo has exited...
4
by: Charlie Brown | last post by:
The thread '<No Name>' (0xedc) has exited with code 0 (0x0) While debugging appplications, I often see this message popup in the VS output window. Although I havent specifically written any...
2
by: many_years_after | last post by:
Hi,pythoners: I countered some problems when I try to stop threads using flag. These are my some important codes: ##### mythread.py def run(self): while self.addr != '': ### text waiting...
11
by: minishilpi | last post by:
I have a question - I have this code below to send an email and I have referenced the Microsoft CDO Library 2000. It doesn't throw any exception in the console window. It goes throughout the code...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.