Hello Experts,
I'm using the following code to run a Thread in parallel to the program:
Thread myThread = new System.Threading.Thread(delegate()
{
//Your code here
System.Threading.Thread.Sleep(14000);
close_window_by_handle(ie);
});
myThread.Start();
Open in new window
In this code I need to wait 14 seconds ( according to the customer request )
the problem is when I run this code few times during 14 seconds it stuck
How do I enhance my code check if a thread is running, if YES it create a new thread in addition to the running one
else it use the Stopped thread
Thanks