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
How can we restart the thread
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Pasan Ratnayake100 reputationPosted Sep 9, 2010, 12:20 AM EDT
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 ?