@@ -193,7 +193,7 @@ Channel Pipeline is built on top of **folly**, Meta's foundational C++ library:
193193|-----------|-------|
194194| `folly::EventBase` | Event loop for async I/O — accessed via `ctx.eventBase()` |
195195| `folly::IOBuf` | Zero-copy buffer chains — `BytesPtr = std::unique_ptr<folly::IOBuf>` |
196- | `folly::DelayedDestructionBase` | Keeps the Pipeline and its owned Contexts alive during callbacks and ContextHandle handoffs |
196+ | `folly::DelayedDestructionBase` | Keeps Pipeline/ Contexts alive during callbacks and ContextHandle handoffs |
197197| `folly::exception_wrapper` | Type-erased exception propagation |
198198
199199Future transport integration will use:
@@ -222,7 +222,7 @@ Channel Pipeline follows a **single-threaded model**:
222222
223223| Rule | Description |
224224|------|-------------|
225- | **All operations on one thread** | Pipeline construction and all message processing must occur on the owning EventBase thread |
225+ | **All operations on one thread** | Build and process messages on the owning EventBase thread |
226226| **No cross-thread access** | Never call pipeline methods from another thread without explicit synchronization |
227227| **No internal locks** | The pipeline has no mutexes — thread safety is the caller's responsibility |
228228| **Use runInEventBaseThread** | To interact with a pipeline from another thread, schedule work on its EventBase |
@@ -492,7 +492,7 @@ Concepts for data flow between transport and pipeline:
492492| Concept | Direction | Purpose |
493493| ---------| -----------| ---------|
494494| ` InboundTransportHandler ` | Network → Pipeline | Receives bytes from transport (` onRead ` , ` onError ` , ` onClose ` ) |
495- | ` OutboundTransportHandler ` | Pipeline → Network | Sends bytes to transport ( ` write ` ), backpressure control (` pauseRead ` , ` resumeRead ` ) |
495+ | ` OutboundTransportHandler ` | Pipeline → Network | Sends bytes and controls backpressure (` pauseRead ` , ` resumeRead ` ) |
496496
497497### App Adapters
498498
@@ -614,12 +614,14 @@ Result on_write(Context& ctx, TypeErasedBox&& msg) noexcept {
614614
615615```cpp
616616template <typename B>
617- concept BufferAllocator = requires(B b, size_t size) {
617+ concept BufferAllocator = requires(B b, size_t size, const void* data ) {
618618 { b.allocate(size) } -> std::same_as<BytesPtr>;
619+ { b.copyBuffer(data, size) } -> std::same_as<BytesPtr>;
619620};
620621```
621622
622- Implementations provide the allocator to the pipeline; handlers just call ` ctx.allocate(size) ` .
623+ Implementations provide allocation to the pipeline; handlers just call ` ctx.allocate(size) ` or
624+ ` ctx.copyBuffer(data, size) ` .
623625
624626---
625627
@@ -1052,7 +1054,7 @@ exists to avoid.
10521054
10531055| Method | Description |
10541056|--------|-------------|
1055- | `PipelineBuilder::addState<T>(args...)` | Register a pipeline-scoped `T` (chain for multiple distinct types ; `T` must be move-constructible) |
1057+ | `PipelineBuilder::addState<T>(args...)` | Register a pipeline-scoped `T`; `T` must be move-constructible |
10561058| `ctx.state<T>()` | Reference to the registered `T` (available in every handler callback) |
10571059
10581060---
0 commit comments