Skip to content

Commit b06ea94

Browse files
committed
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.
1 parent fba7b77 commit b06ea94

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

doc/modules/ROOT/pages/4.guide/4d.sockets.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Move assignment closes any existing socket:
245245
s1 = std::move(s2); // Closes s1's socket if open, then moves s2
246246
----
247247

248-
IMPORTANT: Source and destination must share the same execution context.
248+
NOTE: After a move, the destination uses the source's execution context.
249249

250250
== The io_stream Interface
251251

doc/modules/ROOT/pages/4.guide/4e.tcp-acceptor.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Move assignment closes any existing tcp_acceptor:
225225
acc1 = std::move(acc2); // Closes acc1's socket if open, then moves acc2
226226
----
227227

228-
IMPORTANT: Source and destination must share the same execution context.
228+
NOTE: After a move, the destination uses the source's execution context.
229229

230230
== Thread Safety
231231

doc/modules/ROOT/pages/4.guide/4h.timers.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ corosio::timer t3 = t2; // Error: deleted copy constructor
266266

267267
Move assignment cancels any pending wait on the destination timer.
268268

269-
IMPORTANT: Source and destination must share the same execution context.
269+
NOTE: After a move, the destination uses the source's execution context.
270270

271271
== Thread Safety
272272

doc/modules/ROOT/pages/4.guide/4i.signals.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ corosio::signal_set s2 = std::move(s1); // OK
350350
corosio::signal_set s3 = s2; // Error: deleted copy constructor
351351
----
352352

353-
IMPORTANT: Source and destination must share the same execution context.
353+
NOTE: After a move, the destination uses the source's execution context.
354354

355355
== Thread Safety
356356

doc/modules/ROOT/pages/4.guide/4j.resolver.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ corosio::resolver r2 = std::move(r1); // OK
257257
corosio::resolver r3 = r2; // Error: deleted copy constructor
258258
----
259259

260-
IMPORTANT: Source and destination must share the same execution context.
260+
NOTE: After a move, the destination uses the source's execution context.
261261

262262
== Thread Safety
263263

0 commit comments

Comments
 (0)