Hello All,
I have 2 threads that willl runnning in a timer_tick event
how to determine each thread is already finished to run
I want to try IsAlive .. but I want to make sure.. does IsAlive property will return false when the thread completely finished ?
or any other idea or suggestion?
Thanks
Code:Thread t1; Thread t2; .. .. .. private void runningTimer_Tick(object sender, EventArgs e) { _second++; if (_second >= SECOND_HOUR) { if (!t1.IsAlive && !t2.IsAlive) { _second = 0; t1.Start(); } } else { if (!t2.IsAlive && !t1.IsAlive) { t2.Start(); } } }




Reply With Quote