Hi
I have a program, and there is a timer to run it every 15 minutes. Every time it run, it will create a new exe / thread, (I monitor this thru an external software called TCPView). With the thread growing, it may slow down the performance, is there a way to dispose the thread before a new one is created?
Thanks.
I have a program, and there is a timer to run it every 15 minutes. Every time it run, it will create a new exe / thread, (I monitor this thru an external software called TCPView). With the thread growing, it may slow down the performance, is there a way to dispose the thread before a new one is created?
VB.NET:
Private Sub Processing()
Dim tmrThreadingTimer As Threading.Timer
Try
tmrThreadingTimer = New System.Threading.Timer(New System.Threading.TimerCallback(AddressOf tmrThreadingTimer_TimerCallback), Nothing, 0, 9000)
m_colTimer.Add(tmrThreadingTimer)
Catch ex As Exception
EventLog.WriteEntry(STR_LOG_SOURCE_NAME, "Processing:" & ex.Message & " from source " & ex.Source, EventLogEntryType.Error)
End Try
End Sub
Thanks.