Freigeben über


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( );

Parameters

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

Return Value

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

Remarks

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

See Also

Concepts

CThreadPool Class

CThreadPool Members

IThreadPoolConfig::SetTimeout

CThreadPool::GetTimeout