WaitForThreadpoolIoCallbacks function
Waits for outstanding I/O completion callbacks to complete and optionally cancels pending callbacks that have not yet started to execute.
Syntax
VOID WINAPI WaitForThreadpoolIoCallbacks( _Inout_ PTP_IO pio, _In_ BOOL fCancelPendingCallbacks );
Parameters
- pio [in, out]
-
A TP_IO structure that defines the I/O completion object. The CreateThreadpoolIo function returns this structure.
- fCancelPendingCallbacks [in]
-
Indicates whether to cancel queued callbacks that have not yet started to execute.
Return value
This function does not return a value.
Remarks
When fCancelPendingCallbacks is set to TRUE, only queued callbacks are canceled. Pending I/O requests are not canceled. Therefore, the caller should call GetOverlappedResult for the OVERLAPPED structure to check whether the I/O operation has completed before freeing the structure. As an alternative, set fCancelPendingCallbacks to FALSE and have the associated I/O completion callback free the OVERLAPPED structure. Be careful not to free the OVERLAPPED structure while I/O requests are still pending; use GetOverlappedResult to determine the status of the I/O operation and wait for the operation to complete. The CancelIoEx function can optionally be used first to cancel outstanding I/O requests, potentially shortening the wait. For more information, see Canceling Pending I/O Operations.
To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or higher.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also