WaitForThreadpoolWorkCallbacks

Waits for outstanding work callbacks to complete and optionally cancels pending callbacks that have not yet started to execute.

Syntax

void WaitForThreadpoolWorkCallbacks(
         PTP_WORK pwk,
         BOOL fCancelPendingCallbacks
)  

Parameters

pwk
Type: PTP_WORK 

[in, out] A TP_WORK structure that defines the work object. The CreateThreadpoolWork function returns this structure.

fCancelPendingCallbacks
Type: BOOL 

[in] Indicates whether to cancel queued callbacks that have not yet started to execute.

Return value

None.

Requirements

Header: Declared in threadpoolapiset.h.

Library: Use kernelx.lib.