From c678588e3aba0387e297c11707fc6d162d35610b Mon Sep 17 00:00:00 2001 From: Steve Gerbino Date: Tue, 24 Feb 2026 15:18:07 +0100 Subject: [PATCH] Fix incorrect move semantics docs for I/O objects The guides stated source and destination must share the same execution context, which is not a precondition. Moves transfer context affinity from source to destination. --- doc/modules/ROOT/pages/4.guide/4d.sockets.adoc | 2 +- doc/modules/ROOT/pages/4.guide/4e.tcp-acceptor.adoc | 2 +- doc/modules/ROOT/pages/4.guide/4h.timers.adoc | 2 +- doc/modules/ROOT/pages/4.guide/4i.signals.adoc | 2 +- doc/modules/ROOT/pages/4.guide/4j.resolver.adoc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/modules/ROOT/pages/4.guide/4d.sockets.adoc b/doc/modules/ROOT/pages/4.guide/4d.sockets.adoc index a4a1b61c..1c3c466f 100644 --- a/doc/modules/ROOT/pages/4.guide/4d.sockets.adoc +++ b/doc/modules/ROOT/pages/4.guide/4d.sockets.adoc @@ -245,7 +245,7 @@ Move assignment closes any existing socket: s1 = std::move(s2); // Closes s1's socket if open, then moves s2 ---- -IMPORTANT: Source and destination must share the same execution context. +NOTE: After a move, the destination uses the source's execution context. == The io_stream Interface diff --git a/doc/modules/ROOT/pages/4.guide/4e.tcp-acceptor.adoc b/doc/modules/ROOT/pages/4.guide/4e.tcp-acceptor.adoc index 3a835bdd..68534b34 100644 --- a/doc/modules/ROOT/pages/4.guide/4e.tcp-acceptor.adoc +++ b/doc/modules/ROOT/pages/4.guide/4e.tcp-acceptor.adoc @@ -225,7 +225,7 @@ Move assignment closes any existing tcp_acceptor: acc1 = std::move(acc2); // Closes acc1's socket if open, then moves acc2 ---- -IMPORTANT: Source and destination must share the same execution context. +NOTE: After a move, the destination uses the source's execution context. == Thread Safety diff --git a/doc/modules/ROOT/pages/4.guide/4h.timers.adoc b/doc/modules/ROOT/pages/4.guide/4h.timers.adoc index ecfe63f6..62b2d95e 100644 --- a/doc/modules/ROOT/pages/4.guide/4h.timers.adoc +++ b/doc/modules/ROOT/pages/4.guide/4h.timers.adoc @@ -266,7 +266,7 @@ corosio::timer t3 = t2; // Error: deleted copy constructor Move assignment cancels any pending wait on the destination timer. -IMPORTANT: Source and destination must share the same execution context. +NOTE: After a move, the destination uses the source's execution context. == Thread Safety diff --git a/doc/modules/ROOT/pages/4.guide/4i.signals.adoc b/doc/modules/ROOT/pages/4.guide/4i.signals.adoc index eb43f2ba..5b43b3b0 100644 --- a/doc/modules/ROOT/pages/4.guide/4i.signals.adoc +++ b/doc/modules/ROOT/pages/4.guide/4i.signals.adoc @@ -350,7 +350,7 @@ corosio::signal_set s2 = std::move(s1); // OK corosio::signal_set s3 = s2; // Error: deleted copy constructor ---- -IMPORTANT: Source and destination must share the same execution context. +NOTE: After a move, the destination uses the source's execution context. == Thread Safety diff --git a/doc/modules/ROOT/pages/4.guide/4j.resolver.adoc b/doc/modules/ROOT/pages/4.guide/4j.resolver.adoc index 40a212a2..1b7dff28 100644 --- a/doc/modules/ROOT/pages/4.guide/4j.resolver.adoc +++ b/doc/modules/ROOT/pages/4.guide/4j.resolver.adoc @@ -257,7 +257,7 @@ corosio::resolver r2 = std::move(r1); // OK corosio::resolver r3 = r2; // Error: deleted copy constructor ---- -IMPORTANT: Source and destination must share the same execution context. +NOTE: After a move, the destination uses the source's execution context. == Thread Safety