Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Threading.Thread exit code

I have the code below in a While loop that is starting a series of threads.

I can see in the Debug.Write window if a particular thread exits.

Ho do I capture that as a string when  "If phWorkerThread Exits?"

The thread 'Thread 11 | [5611112222]' (0x1454) has exited with code 0 (0x0).


Dim phoneWorkerThread As New Threading.Thread(AddressOf startPhoneMonitoring)
phoneWorkerThread.Name = "Thread " + CStr(threadCounter) + " | [" + dataRowString + "]"
phoneWorkerThread.Start(sendRow)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Larry Brister

ASKER

You're right...
What I wound up doing is, because I'm passing a parameter into the thread...when it exits, I'm re-initializing a new thread with the same kick off parameter and a "Restarting(sendData) Name"

Pretty cool actually.