IoCompletionRoutine alias
Called for every completion packet of an associated handle.
On this page
- Use
#include <ThinkMeta.ConcurrentTasks/Core.h>- Namespace
ThinkMeta::ConcurrentTasks::AsyncIo- Platforms
- Windows, Linux
On Windows
Syntax
using IoCompletionRoutine =
void (*)(OVERLAPPED* overlapped, DWORD error, DWORD bytesTransferred) noexcept;Parameters
overlappedOVERLAPPED*- The
OVERLAPPEDthe operation was started with; the caller usually embeds it in its own request object to find that again. errorDWORD- The operation's own code (
ERROR_SUCCESSwhen it succeeded), not a thread-local last error. bytesTransferredDWORD- Number of bytes the operation transferred.
Remarks
Runs on the core's I/O thread for handles associated through AssociateHandleWithIoCompletionPort.
On Linux
Called once for every request SubmitIo accepted, when it has completed.
Syntax
using IoCompletionRoutine =
void (*)(IoRequest* request, std::int32_t result) noexcept;Parameters
requestIoRequest*- The request as it was submitted.
resultstd::int32_t- What the operation returned: the bytes transferred (or the new socket of
IoOperation::Accept) when it succeeded, else the negatederrno(-ECANCELEDonceCancelIoorCancelAllIoended it; an operation the kernel was already carrying out may report-EINTRinstead).
Remarks
Runs on the core's I/O thread.
Generated from ThinkMeta.ConcurrentTasks.API @ c7663c4 (2026-11-19).