Controlling ThreadPool Threads

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

Is there a recommended way to safely shutdown ThreadPool Threads

I am creating a windows serivce that uses the ThreadPool class. When I receive a Stop command from the service control manager I want identify which ThreadPool threads are running and either stop them or at least wait for them to finish their tasks.
 
Use ManualResetEvent.

James P
Chris Stransky said:
Hello,

Is there a recommended way to safely shutdown ThreadPool Threads?

I am creating a windows serivce that uses the ThreadPool class. When I
receive a Stop command from the service control manager I want identify
which ThreadPool threads are running and either stop them or at least wait
for them to finish their tasks.
 
Back
Top