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

API reference / Async I/O

AsyncIoRequest class

A request that also stores the operation's error code.

Use
import ThinkMeta.ConcurrentTasks.AsyncIo.AsyncIoRequest;
Namespace
ThinkMeta::ConcurrentTasks::AsyncIo
Inherits
AsyncIoRequestBase

Syntax

template <typename ErrorType> class AsyncIoRequest : public AsyncIoRequestBase

Template parameters

ErrorTypetypename
Integer error code type of the API; 0 must mean success.

Remarks

The error code has the type of its API: Windows::ErrorCode (Win32 error) for files, the Winsock error type for sockets. 0 means success.

See also

AsyncFileIoRequest

Constructors

AsyncIoRequestprotected

Creates a request with error code 0.

Syntax

AsyncIoRequest() noexcept;

Methods

GetError

The completed operation's error code (0: success, also before completion).

Syntax

ErrorType GetError() const noexcept;

Return value

Type: ErrorType

The error code; 0 if the operation succeeded or has not completed yet.

SetError

Stores the error code; for use by AsyncIoRequestBase::RequestCompleted.

Syntax

void SetError(ErrorType error) noexcept;

Parameters

errorErrorType
The operation's error code; 0 for success.

Reset

Like AsyncIoRequestBase::Reset, and also clears the error code.

Syntax

void Reset() noexcept override;

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