Expand description
Thread-pool I/O (TP_IO): a completion backend over the shared overlapped
submission seam.
ThreadpoolIo is the third completion backend for the overlapped model
defined by windows-overlapped-io-sys. It reuses that crate’s endpoint
ownership and pinned Operation storage unchanged, and adds the two
concerns that only the thread pool has:
- Balanced accounting.
StartThreadpoolIomust precede every overlapped operation, and every start must be balanced exactly once – by the I/O callback when a completion will be delivered, or byCancelThreadpoolIowhen the submission failed immediately or completed synchronously on a handle inFILE_SKIP_COMPLETION_PORT_ON_SUCCESSmode. - Callback-driven reclamation. The pool, not the caller, dequeues
completions. Each callback reclaims its operation’s storage: typed through
IoCompletion::claimwhen the payload type is known, or generically through the seam’sreclaim_overlappedwhen the callback lets the completion drop.
The pool’s internal completion port is system-managed and is never exposed: this backend neither posts to it nor dequeues from it.
Structs§
- IoCompletion
- One operation completion delivered to a
ThreadpoolIocallback. - Threadpool
Io - An owned thread-pool I/O object bound to one overlapped endpoint.