T
tshad
I am writing a Service that will start up some threads and I am trying to
find a way to tell if the threads are still running or not?
Is there a good program that will show that threads a service or program has
running?
Part of my code is:
*****************************************************************************
Protected Overrides Sub OnStart(ByVal args() As String)
Dim oCredit1 As New CreditProcessor
'LogInfo("CreditPoller Started")
myLog.WriteEntry("Demo Service Started @ " & TimeStamp())
myThread1 = New Thread(AddressOf oCredit1.ProcessCredit)
oCredit1.ThreadNumber = "1"
myThread1.Start()
End Sub
Class CreditProcessor
Inherits CreditService
Public ThreadNumber As String
Public Sub ProcessCredit()
If debugging Then
DebugPoller("PollAndHandleCredit() Starting Thread Number: " &
ThreadNumber)
End If
If debugging Then
DebugPoller("PollAndHandleCredit() Exiting Thread Number: " &
ThreadNumber)
End If
End Sub
End Class
*******************************************************************
The program just starts a thread that prints to a file that the thread is
starting and ending.
In this example, when the ProcesCredit() function exits - does that kill the
thread?
If not, how do I do that?
Thanks,
Tom
find a way to tell if the threads are still running or not?
Is there a good program that will show that threads a service or program has
running?
Part of my code is:
*****************************************************************************
Protected Overrides Sub OnStart(ByVal args() As String)
Dim oCredit1 As New CreditProcessor
'LogInfo("CreditPoller Started")
myLog.WriteEntry("Demo Service Started @ " & TimeStamp())
myThread1 = New Thread(AddressOf oCredit1.ProcessCredit)
oCredit1.ThreadNumber = "1"
myThread1.Start()
End Sub
Class CreditProcessor
Inherits CreditService
Public ThreadNumber As String
Public Sub ProcessCredit()
If debugging Then
DebugPoller("PollAndHandleCredit() Starting Thread Number: " &
ThreadNumber)
End If
If debugging Then
DebugPoller("PollAndHandleCredit() Exiting Thread Number: " &
ThreadNumber)
End If
End Sub
End Class
*******************************************************************
The program just starts a thread that prints to a file that the thread is
starting and ending.
In this example, when the ProcesCredit() function exits - does that kill the
thread?
If not, how do I do that?
Thanks,
Tom