J
James A Taber
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(ByVal sender As System.Object, ByVal e As
System.EventArgs) 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(AddressOf L(i).StartTimer) '<--- Class1
contains a timer to do the required task.
T(i).Start()
Trace.WriteLine(T(i).ThreadState.ToString) '<---- Unstarted ??
Next
End Sub
sample code:
Dim T() As Thread
Dim L() As Lib1.Class1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) 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(AddressOf L(i).StartTimer) '<--- Class1
contains a timer to do the required task.
T(i).Start()
Trace.WriteLine(T(i).ThreadState.ToString) '<---- Unstarted ??
Next
End Sub