Preliminary. ThinkMeta ConcurrentTasks and this documentation are preliminary; everything is subject to change.

API reference / Async I/O

Functions and constants functions

Free functions and constants of Async I/O.

Use
import ThinkMeta.ConcurrentTasks.AsyncIo.AsyncFileIoRequest;
Namespace
ThinkMeta::ConcurrentTasks::AsyncIo

Functions

AsyncIo::AsyncIoRequestCompleted

The completion routine for handles whose operations use AsyncIoRequestBase requests.

Syntax

inline void AsyncIoRequestCompleted(
    OVERLAPPED* overlapped,
    DWORD error,
    DWORD bytesTransferred
) noexcept;

Parameters

overlappedOVERLAPPED*
The completed operation's OVERLAPPED; must belong to an AsyncIoRequestBase.
errorDWORD
The operation's Win32 error code; ERROR_SUCCESS when it succeeded.
bytesTransferredDWORD
Bytes the operation transferred.

Remarks

Pass it as the IoCompletionRoutine (see Core.h) to AssociateHandleWithIoCompletionPort. Runs on the core's I/O thread and calls the request's AsyncIoRequestBase::RequestCompleted with the operation's own error code. Every OVERLAPPED issued on such a handle must belong to an AsyncIoRequestBase.

See also

EnableAsyncIo

Concepts

AsyncIo::WaitableAsyncFileIoRequestType

Satisfied by the two waitable file request variants.

Syntax

template <typename T>
concept WaitableAsyncFileIoRequestType =
    std::same_as<T, WaitableAsyncFileIoRequest>
    || std::same_as<T, WaitableAsyncFileIoRequest_s>;

Template parameters

Ttypename
The type to test: WaitableAsyncFileIoRequest or WaitableAsyncFileIoRequest_s.

See also

WaitableAsyncFileIoRequest, WaitableAsyncFileIoRequest_s

AsyncIo::AsyncSocketIoRequestType

Satisfied by AsyncSocketIoRequest and every class derived from it.

Syntax

template <typename T>
concept AsyncSocketIoRequestType = std::derived_from<T, AsyncSocketIoRequest>;

Template parameters

Ttypename
The type to test.

AsyncIo::WaitableAsyncSocketIoRequestType

Satisfied by exactly the four waitable request types above.

Syntax

template <typename T>
concept WaitableAsyncSocketIoRequestType =
    std::same_as<T, WaitableAsyncSocketIoRequest>
    || std::same_as<T, WaitableAsyncSocketIoRequest_s>
    || std::same_as<T, WaitableAsyncSocketRecvIoRequest>
    || std::same_as<T, WaitableAsyncSocketRecvIoRequest_s>;

Template parameters

Ttypename
The type to test: WaitableAsyncSocketIoRequest, WaitableAsyncSocketIoRequest_s, WaitableAsyncSocketRecvIoRequest or WaitableAsyncSocketRecvIoRequest_s.

Remarks

Accepted by AsyncSocket's waiting helpers.

Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).