Expand description
Thread-pool waits: CreateThreadpoolWait / SetThreadpoolWait /
WaitForThreadpoolWaitCallbacks / CloseThreadpoolWait.
A wait object watches one waitable handle and queues its callback when the handle is signalled or the wait times out. Two SDK contracts shape this API:
- The handle must stay valid while a wait is pending.
ThreadpoolWaittherefore owns its handle rather than borrowing one, so it cannot be closed underneath a pending wait. UseThreadpoolWait::handleto signal or inspect it. - A wait fires at most once per arming. The SDK requires the wait to be
rearmed explicitly for each activation, so the callback receives a
WaitActivationcarryingWaitActivation::rearm. A callback that does not rearm simply stops watching.
Mutex handles are not supported by the thread pool and must not be passed to
ThreadpoolWait::new.
Structs§
- Threadpool
Wait - An owned thread-pool wait object bound to one waitable handle.
- Wait
Activation - One activation of a
ThreadpoolWait, handed to its callback. - Waitable
Handle - A handle the thread pool is able to wait on.
Enums§
- Wait
Result - Why a wait callback ran.
Type Aliases§
- Wait
Close Fn - A Win32 routine that closes a wait target.