Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ad019b6fd | |||
| 4f862b2c8d |
@@ -239,7 +239,8 @@ Public Class ProcMan
|
|||||||
' se qualche processo in stop, lo faccio ripartire
|
' se qualche processo in stop, lo faccio ripartire
|
||||||
For ThreadIndex = 0 To ThreadList.Count - 1
|
For ThreadIndex = 0 To ThreadList.Count - 1
|
||||||
Dim Thread = ThreadList(ThreadIndex)
|
Dim Thread = ThreadList(ThreadIndex)
|
||||||
If Thread.ThreadState = ThreadState.Stopped Then
|
If Thread.ThreadState = ThreadState.Stopped AndAlso Thread.ThreadState = ThreadState.Aborted AndAlso
|
||||||
|
Thread.ThreadState = ThreadState.Suspended Then
|
||||||
Thread.Abort()
|
Thread.Abort()
|
||||||
Dim ThreadId As Integer = ThreadIndex
|
Dim ThreadId As Integer = ThreadIndex
|
||||||
Thread = New Thread(Sub()
|
Thread = New Thread(Sub()
|
||||||
@@ -760,11 +761,10 @@ Public Class ProcMan
|
|||||||
Integer.TryParse(txtNumThread.Text, numReq)
|
Integer.TryParse(txtNumThread.Text, numReq)
|
||||||
' controllo se cambiato il num thread
|
' controllo se cambiato il num thread
|
||||||
If numReq <> m_MaxCamInstances Then
|
If numReq <> m_MaxCamInstances Then
|
||||||
If m_bStopProcess = False Then
|
|
||||||
stopAllThreads()
|
stopAllThreads()
|
||||||
End If
|
Thread.Sleep(100)
|
||||||
' imposto
|
|
||||||
SetMaxCamInstances(numReq)
|
SetMaxCamInstances(numReq)
|
||||||
|
'startAllThreads()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -916,9 +916,15 @@ Public Class ProcMan
|
|||||||
Private Sub CheckStartAutoRestart()
|
Private Sub CheckStartAutoRestart()
|
||||||
TimerCheck.Enabled = chkAutoRestart.Checked
|
TimerCheck.Enabled = chkAutoRestart.Checked
|
||||||
If chkAutoRestart.Checked Then
|
If chkAutoRestart.Checked Then
|
||||||
TimerCheck.Start()
|
If m_ExecutionThread.ThreadState = ThreadState.Aborted OrElse m_ExecutionThread.ThreadState = ThreadState.Stopped OrElse
|
||||||
Task.Delay(500)
|
m_ExecutionThread.ThreadState = ThreadState.Suspended Then
|
||||||
|
stopAllThreads()
|
||||||
|
Thread.Sleep(200)
|
||||||
|
m_ExecutionThread.Abort()
|
||||||
|
Thread.Sleep(200)
|
||||||
startAllThreads()
|
startAllThreads()
|
||||||
|
End If
|
||||||
|
TimerCheck.Start()
|
||||||
Else
|
Else
|
||||||
TimerCheck.Stop()
|
TimerCheck.Stop()
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user