Share via


CThreadPool::Shutdown

Call this method to shut down the thread pool.

void Shutdown( 
   DWORD dwMaxWait = 0 
) throw( );

Parameters

  • dwMaxWait
    The requested maximum time in milliseconds that the thread pool will wait for a thread to shut down. If 0 or no value is supplied, this method will use the timeout set by CThreadPool::SetTimeout.

Remarks

This method posts a shutdown request to all threads in the pool. If the timeout expires, this method will call TerminateThread on any thread that did not exit. This method is called automatically from the destructor of the class.

Requirements

Header: atlutil.h

See Also

Reference

CThreadPool Class