Thread Completion question

  • Thread starter Thread starter Frank Rizzo
  • Start date Start date
F

Frank Rizzo

I kick off a bunch of threads inside the ThreadPool. How do I know when
the thread is finished running?

Thanks.
 
Hi,

You have to keep a reference to the thread, then you can query
Thread.IsAlive or Therad.Status to know teh status of the thread


Cheers,
 
Ignacio said:
Hi,

You have to keep a reference to the thread, then you can query
Thread.IsAlive or Therad.Status to know teh status of the thread

How can I do it if the Thread is running in the ThreadPool?
 
Hi,

Did you ever took a look at the Thread class in the MSDN ?

Thread.IsThreadPoolThread

Btw, I made a mistake before, it;s Thread.ThreadState no Thread.Status

Sorry, I did not look into MSDN :)


cheers,
 
Back
Top