StreamedFileReaderSettings struct
How a StreamedFileReader reads: granule, how far ahead, how many reads at once.
- Use
import ThinkMeta.ConcurrentTasks.AsyncIo.StreamedFileReader;- Namespace
ThinkMeta::ConcurrentTasks::AsyncIo
Syntax
struct StreamedFileReaderSettingsRemarks
StreamedFileReader::Open corrects out-of-range values instead of failing: segmentSize is raised to at least 64 KB and rounded up to a multiple of 64 KB, readAhead is raised to at least one segment, readsInFlight is clamped to 1..StreamedFileReader::MaxReadsInFlight.
Fields
segmentSize
Bytes per read; memory is committed and decommitted in the same unit.
Syntax
std::uint64_t segmentSize = std::uint64_t{4} << 20;readAhead
How far past the lowest released segment the reader reads without being asked.
Syntax
std::uint64_t readAhead = std::uint64_t{256} << 20;Remarks
A StreamedFileReader::Wait beyond it is still served, and the memory up to that Wait stays committed until every user has released it; so it bounds memory only while all users stay within the read-ahead of the slowest one.
readsInFlight
Overlapped reads the reader task keeps in flight.
Syntax
std::uint32_t readsInFlight = 4;unbuffered
Open the file with FILE_FLAG_NO_BUFFERING.
Syntax
bool unbuffered = false;Remarks
The last read is rounded up to whole sectors.
Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).