As I was going through MSDN on the threading topic I found out that if a thread has been terminated it can’t be restarted once again, if we try to do so we get an exception. Over Here
I was wondering that is there any means by which we can restart the thread to do the same job, MSDN is silent about this ?
Thanks
No, there’s no way of restarting the thread. On the other hand, if you remember the
ThreadStartorParameterizedThreadStartyou gave when creating the thread, you can start another one with the same delegate. Note that that will start the delegate again though, from scratch – if you were trying to “keep going” from where the thread had got to, you’ll need to store that state somewhere.I can’t say I’ve ever wanted to do this though – what’s your use case? There may be a better approach.