Commit f12f876
committed
Overhaul type-erased I/O wrappers, design docs, and test coverage
Redesign the any_read_source and any_write_sink type-erasing wrappers
to use a split vtable architecture with per-operation awaitable_ops
dispatch, enabling zero-allocation steady-state I/O across multiple
heterogeneous async operations. Restructure any_read_stream and
any_write_stream flat vtables for optimal cache line coherence by
ordering function pointers according to call sequence.
Introduce buffer_array iterator-range constructors (truncating and
throwing variants) for efficient buffer sequence materialization.
Add buffer_param::more() to detect whether additional buffers remain
beyond the current window. Convert buffer_param internal storage to
use a union with placement-new construction, eliminating default
initialization of buffer descriptors.
Rewrite the ReadStream design document with a rigorous derivation of
the errors-exclude-data contract, reconstructing Kohlhoff's reasoning
from the Asio source code, POSIX/Windows system call semantics, and
composed operation requirements. Add post-error preconditions across
all read and write operations.
Add two new design documents: Run API Design (two-phase invocation
pattern, allocator timing constraints, C++17 postfix evaluation order,
comparison with std::execution) and Type-Erasing Awaitables (flat vs
split vtable layouts, cache line analysis, construct-in-await_ready vs
construct-in-await_suspend strategies).
Work around GCC 14 internal compiler error in write_now::operator()
by replacing abbreviated function template syntax with explicit
template parameter, avoiding an ICE in expand_expr_real_1 during
RTL expansion of coroutine code on MinGW.
Add comprehensive unit tests for any_read_source, any_read_stream,
any_write_sink, any_write_stream, buffer_array, buffer_param,
buffer_sink, buffer_source, read_source, write_sink, and stream
test utilities, bringing total new test coverage to ~2,300 lines.1 parent e320b5a commit f12f876
33 files changed
Lines changed: 4034 additions & 562 deletions
File tree
- doc/modules/ROOT
- pages/design
- include/boost/capy
- buffers
- concept
- io
- test
- test/unit
- buffers
- io
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| |||
400 | 410 | | |
401 | 411 | | |
402 | 412 | | |
403 | | - | |
| 413 | + | |
404 | 414 | | |
405 | 415 | | |
406 | 416 | | |
| |||
0 commit comments