Condividi tramite


CWorkerThread::Shutdown

Call this method to shut down the worker thread.

HRESULT Shutdown(
   DWORD dwWait = ATL_WORKER_THREAD_WAIT 
) throw( );

Parameters

  • dwWait
    The time in milliseconds to wait for the worker thread to shut down.

Return Value

Returns S_OK on success, or an error HRESULT on failure, such as if the timeout value, dwWait, is exceeded.

Remarks

To reuse the object, call CWorkerThread::Initialize after calling this method.

Note that calling Shutdown on an object initialized with a pointer to another CWorkerThread object has no effect and always returns S_OK.

Requirements

Header: atlutil.h

See Also

Reference

CWorkerThread Class

ATL_WORKER_THREAD_WAIT

Other Resources

CWorkerThread Members