I search solution for a little bit strange problem , I working on an
application which includes a button.
Click on this button will create number of threads each one execute deferent
executable file, while those threads on going a timer generate .
In the timer tick function I kill all the threads an I should run all again
by clicking again on the button.
means that I should call the click button from the timer function, it's
maybe will done lot of time, means the stuck will overflow since I will never
return back from the timer function !
Is there any intelligent way to do that, not by calling the function as I
done (see the following implementation) , Or is there any way to free the
stuck or something ?
Or may be in C# it's OK to do such ?
private void myTimer_Tick(object sender, System.EventArgs e)
{
try
{
Go_button_Click(null, null);
}
catch(System.Exception ex)
{
......;
}
}