Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/2.cpp20-coroutines/2b.syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section introduces the three {cpp}20 keywords that create coroutines and wa

== Prerequisites

* Completed xref:2a.foundations.adoc[Part I: Foundations]
* Completed xref:2.cpp20-coroutines/2a.foundations.adoc[Part I: Foundations]
* Understanding of why coroutines exist and what problem they solve

== The Three Keywords
Expand Down Expand Up @@ -85,7 +85,7 @@ SimpleCoroutine my_first_coroutine()
}
----

The `promise_type` nested structure provides the minimum scaffolding the compiler needs. You will learn what each method does in xref:2c.machinery.adoc[Part III: Coroutine Machinery].
The `promise_type` nested structure provides the minimum scaffolding the compiler needs. You will learn what each method does in xref:2.cpp20-coroutines/2c.machinery.adoc[Part III: Coroutine Machinery].

For now, observe that the presence of `co_return` transforms what looks like a regular function into a coroutine. If you try to compile a function with coroutine keywords but without proper infrastructure, the compiler will produce errors.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains the promise type and coroutine handle—the core machinery

== Prerequisites

* Completed xref:2b.syntax.adoc[Part II: {cpp}20 Syntax]
* Completed xref:2.cpp20-coroutines/2b.syntax.adoc[Part II: {cpp}20 Syntax]
* Understanding of the three coroutine keywords
* Familiarity with awaitables and awaiters

Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/2.cpp20-coroutines/2d.advanced.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section covers advanced coroutine topics: symmetric transfer for efficient

== Prerequisites

* Completed xref:2c.machinery.adoc[Part III: Coroutine Machinery]
* Completed xref:2.cpp20-coroutines/2c.machinery.adoc[Part III: Coroutine Machinery]
* Understanding of promise types, coroutine handles, and generators

== Symmetric Transfer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section introduces the dangers of shared data access and the synchronizatio

== Prerequisites

* Completed xref:3a.foundations.adoc[Part I: Foundations]
* Completed xref:3.concurrency/3a.foundations.adoc[Part I: Foundations]
* Understanding of threads and their lifecycle

== The Danger: Race Conditions
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/3.concurrency/3c.advanced.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section covers advanced synchronization primitives: atomics for lock-free o

== Prerequisites

* Completed xref:3b.synchronization.adoc[Part II: Synchronization]
* Completed xref:3.concurrency/3b.synchronization.adoc[Part II: Synchronization]
* Understanding of mutexes, lock guards, and deadlocks

== Atomics: Lock-Free Operations
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/3.concurrency/3d.patterns.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section covers communication mechanisms for getting results from threads an

== Prerequisites

* Completed xref:3c.advanced.adoc[Part III: Advanced Primitives]
* Completed xref:3.concurrency/3c.advanced.adoc[Part III: Advanced Primitives]
* Understanding of atomics, condition variables, and shared locks

== Futures and Promises: Getting Results Back
Expand Down
8 changes: 4 additions & 4 deletions doc/modules/ROOT/pages/4.coroutines/4b.launching.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains how to launch coroutines for execution. You will learn abo

== Prerequisites

* Completed xref:4a.tasks.adoc[The task Type]
* Completed xref:4.coroutines/4a.tasks.adoc[The task Type]
* Understanding of lazy task execution

== The Execution Model
Expand Down Expand Up @@ -35,7 +35,7 @@ int main()
thread_pool pool;
run_async(pool.get_executor())(compute());
// Task is now running on the thread pool

// pool destructor waits for work to complete
return 0;
}
Expand Down Expand Up @@ -115,10 +115,10 @@ Inside a coroutine, use `run` to execute a child task on a different executor:
task<int> compute_on_pool(thread_pool& pool)
{
// This task runs on whatever executor we're already on

// But this child task runs on the pool's executor:
int result = co_await run(pool.get_executor())(expensive_computation());

// After co_await, we're back on our original executor
co_return result;
}
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/4.coroutines/4c.executors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains executors and execution contexts—the mechanisms that con

== Prerequisites

* Completed xref:4b.launching.adoc[Launching Coroutines]
* Completed xref:4.coroutines/4b.launching.adoc[Launching Coroutines]
* Understanding of `run_async` and `run`

== The Executor Concept
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/4.coroutines/4d.io-awaitable.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains the IoAwaitable protocol—Capy's mechanism for propagatin

== Prerequisites

* Completed xref:4c.executors.adoc[Executors and Execution Contexts]
* Completed xref:4.coroutines/4c.executors.adoc[Executors and Execution Contexts]
* Understanding of standard awaiter protocol (`await_ready`, `await_suspend`, `await_resume`)

== The Problem: Context Propagation
Expand Down
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/4.coroutines/4e.cancellation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section teaches cooperative cancellation from the ground up, explaining {cp

== Prerequisites

* Completed xref:4d.io-awaitable.adoc[The IoAwaitable Protocol]
* Completed xref:4.coroutines/4d.io-awaitable.adoc[The IoAwaitable Protocol]
* Understanding of how context propagates through coroutine chains

== Part 1: The Problem
Expand Down Expand Up @@ -371,7 +371,7 @@ public:

=== when_any Cancellation

`when_any` uses stop tokens internally to cancel "losing" tasks when the first task completes. This is covered in xref:4f.composition.adoc[Concurrent Composition].
`when_any` uses stop tokens internally to cancel "losing" tasks when the first task completes. This is covered in xref:4.coroutines/4f.composition.adoc[Concurrent Composition].

== Reference

Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/4.coroutines/4f.composition.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains how to run multiple tasks concurrently using `when_all` an

== Prerequisites

* Completed xref:4e.cancellation.adoc[Stop Tokens and Cancellation]
* Completed xref:4.coroutines/4e.cancellation.adoc[Stop Tokens and Cancellation]
* Understanding of stop token propagation

== Overview
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/4.coroutines/4g.allocators.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains how coroutine frames are allocated and how to customize al

== Prerequisites

* Completed xref:4f.composition.adoc[Concurrent Composition]
* Completed xref:4.coroutines/4f.composition.adoc[Concurrent Composition]
* Understanding of coroutine frame allocation from xref:../2.cpp20-coroutines/2d.advanced.adoc[{cpp}20 Coroutines Tutorial]

== The Timing Constraint
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/5.buffers/5a.overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ The concept-driven approach:
* Provides a single signature that accepts anything buffer-like
* Follows proven STL design principles

Continue to xref:5b.types.adoc[Buffer Types] to learn about `const_buffer` and `mutable_buffer`.
Continue to xref:5.buffers/5b.types.adoc[Buffer Types] to learn about `const_buffer` and `mutable_buffer`.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/5.buffers/5b.types.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section introduces Capy's fundamental buffer types: `const_buffer` and `mut

== Prerequisites

* Completed xref:5a.overview.adoc[Why Concepts, Not Spans]
* Completed xref:5.buffers/5a.overview.adoc[Why Concepts, Not Spans]
* Understanding of why concept-driven buffers enable composition

== Why Not std::byte?
Expand Down Expand Up @@ -197,4 +197,4 @@ auto e = end(multi); // Returns multi.end()
| Buffer creation utilities
|===

You have now learned about `const_buffer` and `mutable_buffer`. Continue to xref:5c.sequences.adoc[Buffer Sequences] to understand how these types compose into sequences.
You have now learned about `const_buffer` and `mutable_buffer`. Continue to xref:5.buffers/5c.sequences.adoc[Buffer Sequences] to understand how these types compose into sequences.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/5.buffers/5c.sequences.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains buffer sequences—the concept that enables zero-allocatio

== Prerequisites

* Completed xref:5b.types.adoc[Buffer Types]
* Completed xref:5.buffers/5b.types.adoc[Buffer Types]
* Understanding of `const_buffer` and `mutable_buffer`

== What Is a Buffer Sequence?
Expand Down Expand Up @@ -172,4 +172,4 @@ If your custom buffer sequence only provides forward iteration, wrap it in a typ
| Incremental consumption wrapper
|===

You have now learned how buffer sequences enable zero-allocation composition. Continue to xref:5d.system-io.adoc[System I/O Integration] to see how buffer sequences interface with operating system I/O.
You have now learned how buffer sequences enable zero-allocation composition. Continue to xref:5.buffers/5d.system-io.adoc[System I/O Integration] to see how buffer sequences interface with operating system I/O.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/5.buffers/5d.system-io.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains how buffer sequences interface with operating system I/O o

== Prerequisites

* Completed xref:5c.sequences.adoc[Buffer Sequences]
* Completed xref:5.buffers/5c.sequences.adoc[Buffer Sequences]
* Understanding of buffer sequence concepts

== The Virtual Boundary
Expand Down Expand Up @@ -202,4 +202,4 @@ The buffer sequence concepts and translation utilities are in:

OS-specific I/O is handled by Corosio, which builds on Capy's buffer model.

You have now learned how buffer sequences integrate with operating system I/O. Continue to xref:5e.algorithms.adoc[Buffer Algorithms] to learn about measuring and copying buffers.
You have now learned how buffer sequences integrate with operating system I/O. Continue to xref:5.buffers/5e.algorithms.adoc[Buffer Algorithms] to learn about measuring and copying buffers.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/5.buffers/5e.algorithms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section covers algorithms for measuring and manipulating buffer sequences.

== Prerequisites

* Completed xref:5c.sequences.adoc[Buffer Sequences]
* Completed xref:5.buffers/5c.sequences.adoc[Buffer Sequences]
* Understanding of `ConstBufferSequence` and iteration

== Measuring Buffers
Expand Down Expand Up @@ -259,4 +259,4 @@ public:
| Copy algorithm
|===

You have now learned how to measure and copy buffer sequences. Continue to xref:5f.dynamic.adoc[Dynamic Buffers] to learn about growable buffer storage.
You have now learned how to measure and copy buffer sequences. Continue to xref:5.buffers/5f.dynamic.adoc[Dynamic Buffers] to learn about growable buffer storage.
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/5.buffers/5f.dynamic.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section introduces dynamic buffers—growable storage that adapts to data f

== Prerequisites

* Completed xref:5e.algorithms.adoc[Buffer Algorithms]
* Completed xref:5.buffers/5e.algorithms.adoc[Buffer Algorithms]
* Understanding of buffer sequences and copying

== The Producer/Consumer Model
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/6.streams/6a.overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,4 @@ echo(s3);

Same code, different transports—compile once, link anywhere.

Continue to xref:6b.streams.adoc[Streams (Partial I/O)] to learn the `ReadStream` and `WriteStream` concepts in detail.
Continue to xref:6.streams/6b.streams.adoc[Streams (Partial I/O)] to learn the `ReadStream` and `WriteStream` concepts in detail.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/6.streams/6b.streams.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains the `ReadStream` and `WriteStream` concepts for partial I/

== Prerequisites

* Completed xref:6a.overview.adoc[Stream Concepts Overview]
* Completed xref:6.streams/6a.overview.adoc[Stream Concepts Overview]
* Understanding of the six stream concept categories

== ReadStream
Expand Down Expand Up @@ -233,4 +233,4 @@ The implementation doesn't know the concrete stream type. It compiles once and w
| Type-erased bidirectional stream wrapper
|===

You have now learned the stream concepts for partial I/O. Continue to xref:6c.sources-sinks.adoc[Sources and Sinks] to learn about complete I/O with EOF signaling.
You have now learned the stream concepts for partial I/O. Continue to xref:6.streams/6c.sources-sinks.adoc[Sources and Sinks] to learn about complete I/O with EOF signaling.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/6.streams/6c.sources-sinks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains the `ReadSource` and `WriteSink` concepts for complete I/O

== Prerequisites

* Completed xref:6b.streams.adoc[Streams (Partial I/O)]
* Completed xref:6.streams/6b.streams.adoc[Streams (Partial I/O)]
* Understanding of partial I/O with `ReadStream` and `WriteStream`

== ReadSource
Expand Down Expand Up @@ -238,4 +238,4 @@ Same `send_body` function, different transfer encodings—the library handles th
| Type-erased write sink wrapper
|===

You have now learned about sources and sinks for complete I/O. Continue to xref:6d.buffer-concepts.adoc[Buffer Sources and Sinks] to learn about the callee-owns-buffers pattern.
You have now learned about sources and sinks for complete I/O. Continue to xref:6.streams/6d.buffer-concepts.adoc[Buffer Sources and Sinks] to learn about the callee-owns-buffers pattern.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/6.streams/6d.buffer-concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains the `BufferSource` and `BufferSink` concepts for zero-copy

== Prerequisites

* Completed xref:6c.sources-sinks.adoc[Sources and Sinks]
* Completed xref:6.streams/6c.sources-sinks.adoc[Sources and Sinks]
* Understanding of caller-owns-buffers patterns

== Callee-Owns-Buffers Pattern
Expand Down Expand Up @@ -263,4 +263,4 @@ task<> decompress_stream(any_buffer_source& compressed, any_write_sink& output)
| Type-erased buffer sink wrapper
|===

You have now learned about buffer sources and sinks for zero-copy I/O. Continue to xref:6e.algorithms.adoc[Transfer Algorithms] to learn about composed read/write operations.
You have now learned about buffer sources and sinks for zero-copy I/O. Continue to xref:6.streams/6e.algorithms.adoc[Transfer Algorithms] to learn about composed read/write operations.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/6.streams/6e.algorithms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains the composed read/write operations and transfer algorithms

== Prerequisites

* Completed xref:6d.buffer-concepts.adoc[Buffer Sources and Sinks]
* Completed xref:6.streams/6d.buffer-concepts.adoc[Buffer Sources and Sinks]
* Understanding of all six stream concepts

== Composed Read/Write
Expand Down Expand Up @@ -250,4 +250,4 @@ else if (ec.failed())
| ReadSource/ReadStream → BufferSink transfer
|===

You have now learned about transfer algorithms. Continue to xref:6f.isolation.adoc[Physical Isolation] to learn how type erasure enables compilation firewalls.
You have now learned about transfer algorithms. Continue to xref:6.streams/6f.isolation.adoc[Physical Isolation] to learn how type erasure enables compilation firewalls.
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/6.streams/6f.isolation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section explains how type-erased wrappers enable compilation firewalls and

== Prerequisites

* Completed xref:6e.algorithms.adoc[Transfer Algorithms]
* Completed xref:6.streams/6e.algorithms.adoc[Transfer Algorithms]
* Understanding of type-erased wrappers

== The Compilation Firewall Pattern
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/7.examples/7a.hello-task.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ Hello from Capy!

== Next Steps

* xref:7b.producer-consumer.adoc[Producer-Consumer] — Multiple tasks communicating
* xref:7.examples/7b.producer-consumer.adoc[Producer-Consumer] — Multiple tasks communicating
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/7.examples/7b.producer-consumer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Two tasks communicating via an async event, with strand serialization.

== Prerequisites

* Completed xref:7a.hello-task.adoc[Hello Task]
* Completed xref:7.examples/7a.hello-task.adoc[Hello Task]
* Understanding of basic task creation and launching

== Source Code
Expand Down Expand Up @@ -171,4 +171,4 @@ Consumer: received value 42

== Next Steps

* xref:7c.buffer-composition.adoc[Buffer Composition] — Zero-allocation buffer composition
* xref:7.examples/7c.buffer-composition.adoc[Buffer Composition] — Zero-allocation buffer composition
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/7.examples/7c.buffer-composition.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Composing buffer sequences without allocation for scatter/gather I/O.

== Prerequisites

* Completed xref:7b.producer-consumer.adoc[Producer-Consumer]
* Completed xref:7.examples/7b.producer-consumer.adoc[Producer-Consumer]
* Understanding of buffer types from xref:../5.buffers/5b.types.adoc[Buffer Types]

== Source Code
Expand Down Expand Up @@ -228,4 +228,4 @@ Prepared 2 buffers with 128 bytes total capacity

== Next Steps

* xref:7d.mock-stream-testing.adoc[Mock Stream Testing] — Unit testing with mock streams
* xref:7.examples/7d.mock-stream-testing.adoc[Mock Stream Testing] — Unit testing with mock streams
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/7.examples/7d.mock-stream-testing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Unit testing protocol code with mock streams and error injection.

== Prerequisites

* Completed xref:7c.buffer-composition.adoc[Buffer Composition]
* Completed xref:7.examples/7c.buffer-composition.adoc[Buffer Composition]
* Understanding of streams from xref:../6.streams/6b.streams.adoc[Streams]

== Source Code
Expand Down Expand Up @@ -258,4 +258,4 @@ All tests passed!

== Next Steps

* xref:7e.type-erased-echo.adoc[Type-Erased Echo] — Compilation firewall pattern
* xref:7.examples/7e.type-erased-echo.adoc[Type-Erased Echo] — Compilation firewall pattern
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/7.examples/7e.type-erased-echo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Echo server demonstrating the compilation firewall pattern.

== Prerequisites

* Completed xref:7d.mock-stream-testing.adoc[Mock Stream Testing]
* Completed xref:7.examples/7d.mock-stream-testing.adoc[Mock Stream Testing]
* Understanding of type erasure from xref:../6.streams/6f.isolation.adoc[Physical Isolation]

== Source Code
Expand Down Expand Up @@ -192,4 +192,4 @@ Echo output: Hello, World!

== Next Steps

* xref:7f.timeout-cancellation.adoc[Timeout with Cancellation] — Stop tokens for timeout
* xref:7.examples/7f.timeout-cancellation.adoc[Timeout with Cancellation] — Stop tokens for timeout
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Using stop tokens to implement operation timeouts.

== Prerequisites

* Completed xref:7e.type-erased-echo.adoc[Type-Erased Echo]
* Completed xref:7.examples/7e.type-erased-echo.adoc[Type-Erased Echo]
* Understanding of stop tokens from xref:../4.coroutines/4e.cancellation.adoc[Cancellation]

== Source Code
Expand Down Expand Up @@ -238,4 +238,4 @@ Cancelled (returned nullopt)

== Next Steps

* xref:7g.parallel-fetch.adoc[Parallel Fetch] — Concurrent operations with when_all
* xref:7.examples/7g.parallel-fetch.adoc[Parallel Fetch] — Concurrent operations with when_all
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/7.examples/7g.parallel-fetch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Running multiple operations concurrently with `when_all`.

== Prerequisites

* Completed xref:7f.timeout-cancellation.adoc[Timeout with Cancellation]
* Completed xref:7.examples/7f.timeout-cancellation.adoc[Timeout with Cancellation]
* Understanding of `when_all` from xref:../4.coroutines/4f.composition.adoc[Composition]

== Source Code
Expand Down Expand Up @@ -258,4 +258,4 @@ Caught error: B failed!

== Next Steps

* xref:7h.custom-dynamic-buffer.adoc[Custom Dynamic Buffer] — Implementing your own buffer
* xref:7.examples/7h.custom-dynamic-buffer.adoc[Custom Dynamic Buffer] — Implementing your own buffer
Loading
Loading