• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 643
  • Last Modified:

VB.Net Thread exited

The following code is inside a While loop which will start from 6 - 12 threads.

                Dim phoneWorkerThread As New Thread(AddressOf startPhoneMonitoring)
                phoneWorkerThread.Start(sendRow)

Each thread runs in a continuous loop.

Once in a while I get a message (in Debug.Write) like this
The thread '<No Name>' (0x1e80) has exited with code 0 (0x0).

I know I can name a thread...but how do I get that message to say something like
The thread 'Process 7 ' (0x1e80) has exited with code 0 (0x0).
0
lrbrister
Asked:
lrbrister
1 Solution
 
Kyle AbrahamsSenior .Net DeveloperCommented:
Changing the name should change it the message:

                Dim phoneWorkerThread As New Thread(AddressOf startPhoneMonitoring)
                phoneWorkerThread.Name = "Process " + i.ToString()  ' i being the loop counter.
                phoneWorkerThread.Start(sendRow)
0
 
lrbristerAuthor Commented:
Thanks
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now