ClusWorkerCheckTerminate

The ClusWorkerCheckTerminate utility function determines whether or not a worker thread should exit as soon as possible.

BOOL WINAPI ClusWorkerCheckTerminate(
  PCLUS_WORKER Worker
);
 

Parameters

Worker
[in] Pointer to a CLUS_WORKER structure describing the thread to check.

Return Values

TRUE
The thread should terminate.
FALSE
The thread should not terminate.

Notes to Callers

ClusWorkerCheckTerminate checks the Terminate member of the CLUS_WORKER structure to determine whether or not the thread pointed to by Worker should exit. The Terminate member is used to prevent a race condition from occurring when multiple threads call ClusWorkerCheckTerminate on the same worker thread. The first call sets Terminate to TRUE. The second and subsequent calls will check that Terminate is set and return immediately without waiting for the worker thread to exit.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in clusapi.h.