|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Still getting 'The thread <'No Name'> ... has exited' after setting names of threadsThread t = new Thread(new ThreadStart(delegate { Debug.WriteLine("Test"); })); t.Name = "TestThread"; t.Start(); I still get that the thread has no name. The debug output is: Test The thread '<No Name>' (0x164c) has exited with code 0 (0x0). What am I doing wrong? Is there a bug in 2.0 regarding thread names or is there something else I need to do as well? -- Lasse Vågsæther Karlsen mailto:la***@vkarlsen.no I think it's to do with the console window. I did run your code and was able
to reproduce it, but you should note that the thread is indeed named correctly in the thread window. Show quote "Lasse Vågsæther Karlsen" wrote: > After executing the following code in .NET 2.0: > > Thread t = new Thread(new ThreadStart(delegate > { > Debug.WriteLine("Test"); > })); > t.Name = "TestThread"; > t.Start(); > > I still get that the thread has no name. The debug output is: > > Test > The thread '<No Name>' (0x164c) has exited with code 0 (0x0). > > What am I doing wrong? Is there a bug in 2.0 regarding thread names or > is there something else I need to do as well? > > -- > Lasse Vågsæther Karlsen > mailto:la***@vkarlsen.no > |
|||||||||||||||||||||||