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

API reference / Async I/O

AsyncFileIoRequest class

An overlapped file read or write.

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

Syntax

Remarks

Holds the file offset to transfer at, and after completion the Win32 error code (GetError) and the transferred bytes (GetTransferredBytes). Not usable on its own: use WaitableAsyncFileIoRequest(_s), or an own request type built on it that reacts to the completion in RequestCompleted. The request must stay alive while its operation is pending (see AsyncIoRequestBase).

See also

WaitableAsyncFileIoRequest_s, AsyncFile

Constructors

AsyncFileIoRequestprotected

Creates a request at file offset 0.

Syntax

AsyncFileIoRequest() noexcept = default;

Methods

GetOffset

The 64-bit file offset of the operation.

Syntax

unsigned long long GetOffset() const noexcept;

Return value

Type: unsigned long long

The file offset in bytes; 0 after Reset.

Remarks

Stored in OVERLAPPED Offset/OffsetHigh.

See also

SetOffset

SetOffset

Sets the file offset for the next operation.

Syntax

void SetOffset(unsigned long long offset) noexcept;

Parameters

offsetunsigned long long
File offset in bytes to read or write at; sector-aligned for a handle opened with FILE_FLAG_NO_BUFFERING.

Remarks

Call after Reset (which zeroes it) and before issuing; overlapped file handles have no file pointer, every operation needs one.

See also

GetOffset

RequestCompleted

Stores the Win32 error code and the transferred bytes; signals nothing.

Syntax

void RequestCompleted(DWORD error, DWORD bytesTransferred) noexcept override;

Parameters

errorDWORD
The operation's Win32 error code; ERROR_SUCCESS when it succeeded.
bytesTransferredDWORD
Bytes the operation transferred.

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