Larry Brister
asked on
Kill thread from inside VB.Net Application
I have a windows service running
Inside a While statement I kick off a thread "for each" in the while
I am giving each thread a particular name
Once the while exits, all the threads are running.
How could I kill a particular thread by name from a different sub in the same service?
Inside a While statement I kick off a thread "for each" in the while
I am giving each thread a particular name
Once the while exits, all the threads are running.
How could I kill a particular thread by name from a different sub in the same service?
If Not sendRow Is Nothing And sendRow.Length > 20 Then
'Declare and start individual thread for each (phonelist) loop
Dim phoneWorkerThread As New Thread(AddressOf startPhoneMonitoring)
phoneWorkerThread.Name = "Thread " + CStr(threadCounter)
phoneWorkerThread.IsBackground = True
phoneWorkerThread.Start(sendRow)
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
After a lot of research that was my plan.
Just looking for some verification since I'm dealing with another in house developer who's first answer is ALWAYS...I think we should do it (not your way but mine) on anything that comes up.