Releases the specified I/O completion object.
void CloseThreadpoolIo(
PTP_IO pio
)
pio
Type: PTP_IO
[in, out] A TP_IO structure that defines the I/O completion object. The CreateThreadpoolIo function returns this structure.
The I/O completion object is freed immediately if there are no outstanding callbacks; otherwise, the I/O completion object is freed asynchronously after the outstanding callbacks complete.
You should close the associated file handle and wait for all outstanding overlapped I/O operations to complete before calling this function—you must not cause any more overlapped I/O operations to occur after calling this function.
It may be necessary to cancel threadpool I/O notifications to prevent memory leaks. For more information, see CancelThreadpoolIo.
Header: Declared in threadpoolapiset.h.
Library: Use kernelx.lib.