wrote:
How do i know that the thread has finished the job?
As I said before, you can call
Thread.IsAlive
or
Thread.ThreadState
( which gives more information ).
wrote:
Do i need to abort or dispose the thread just like we do for objects?
Thread
does not implement
IDisposable
, so you can't dispose it.
Thread.Abort
is
evil - never use it!
So the answer to your question is no. When a thread finishes, just remove any references to it and the runtime will clean up for you.
I suggest that you keep references to your threads in your control class and when the timer fires, check to see if the previous threads have completed. If they are still working then just return and wait for the next timer. If they have finished, then you can create new ones again.
Nick