I fixed it by :
Btw, SignalAndWait is not always reached, IMHO it indicates unreliability of expect
If InStr(S, StopOnText, CompareMethod.Text) > 0 Then
System.Threading.WaitHandle.SignalAndWait(AR.AsyncWaitHandle, AR.AsyncWaitHandle, 1, False)
End If
May be another signaling method can be used without second wait?Btw, SignalAndWait is not always reached, IMHO it indicates unreliability of expect