Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CThreadPool::SetTimeout

 

Call this method to set the maximum time in milliseconds that the thread pool will wait for a thread to shut down.


      HRESULT STDMETHODCALLTYPE SetTimeout(
   DWORD dwMaxWait 
) throw( );

dwMaxWait

The requested maximum time in milliseconds that the thread pool will wait for a thread to shut down.

Returns S_OK on success, or an error HRESULT on failure.

The timeout is initialized to ATLS_DEFAULT_THREADPOOLSHUTDOWNTIMEOUT in the constructor.

Note that dwMaxWait is the time that the pool will wait for a single thread to shut down. The maximum time that could be taken to remove multiple threads from the pool could be slightly less than dwMaxWait multiplied by the number of threads.

Requirements

Header: atlutil.h

Show: