What I want to implement is to restart certain thread every 24 hours...
sample code:
Dim T() As Thread
Dim L() As Lib1.Class1
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim i As Integer = 0
For i = 0 To 2
ReDim Preserve T(i)
ReDim Preserve L(i)
L(i) = New Lib1.Class1
L(i).m1 = i
T(i) = New Thread(AddressO f L(i).StartTimer ) '<--- Class1
contains a timer to do the required task.
T(i).Start()
Trace.WriteLine (T(i).ThreadSta te.ToString) '<---- Unstarted ??
Next
End Sub
sample code:
Dim T() As Thread
Dim L() As Lib1.Class1
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim i As Integer = 0
For i = 0 To 2
ReDim Preserve T(i)
ReDim Preserve L(i)
L(i) = New Lib1.Class1
L(i).m1 = i
T(i) = New Thread(AddressO f L(i).StartTimer ) '<--- Class1
contains a timer to do the required task.
T(i).Start()
Trace.WriteLine (T(i).ThreadSta te.ToString) '<---- Unstarted ??
Next
End Sub
Comment