Thread Name in Output window

  • Thread starter Thread starter Gunnar_Frenzel
  • Start date Start date
G

Gunnar_Frenzel

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 with code " when the
threads name was set to "foo". Now in Visual Studio 2005 the message
always uses the Thread ID instead of the name even when a name is set
to this thread. Do I have to edit any further setting in Visual Studio
to display the thread's name instead of its ID (or both)?
Thanks in advance.
Gunnar
 
Hello Gunnar,

Strange, It's always used Thread.Name, and put Thread <No Name> if name is
not set
Don't u mess anything?

GF> Hello,
GF> I have an application running some threads which all get a name
GF> using
GF> the Name property. In Visual Studio 2003 when a thread exited the
GF> name
GF> is displayed in the "The thread foo has exited with code " when the
GF> threads name was set to "foo". Now in Visual Studio 2005 the message
GF> always uses the Thread ID instead of the name even when a name is
GF> set
GF> to this thread. Do I have to edit any further setting in Visual
GF> Studio
GF> to display the thread's name instead of its ID (or both)?
GF> Thanks in advance.
GF> Gunnar
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Hello,
that's what confuses me, too.
I create the thread as follows:

Thread thThreadname = null;

thThreadname = new Thread(new ThreadStart(threadMethod));
thThreadname.Name = "Threadname";
thThreadname.Start();

When I pause execution of the application and take a look at the Threads window from Debug -> Windows menu then the
threads all have the name I gave them using the Name property but in the output window it always just says:
The thread 0xf24 has exited with code 0 (0x0).
(for example).

So I don't have any idea where the problem is... :(

Gunnar
 
Back
Top