i am creating thread as like
Thread t=new Thread(new ThreadStart(thMethod));
in function 1 i call that thread
function1()
{
t.start();
}
in function 2 i want to start the same thread object
function2()
{
t.start() //here problem is Thread is running or terminated; it cannot restart.
}
how can i restart that thread object with out again initialization
Loading
Pasan RatnayakePosted Sep 9, 2010, 4:20 AM
I surely can help you but there are few things that I want to make sure beforehand. Why do you want to re-use the same thread object? Is it that you want to restart whatever the task you are doing with "thMethod" ?? or just to re-use ?