@@ -1012,7 +1012,7 @@ for you. Much like algorithms that compose senders relieve the user from having
1012
1012
receiver types, algorithms that introduce concurrency and provide higher-level cancellation semantics
1013
1013
relieve the user from having to deal with low-level details of cancellation.
1014
1014
1015
- ### Cancellation design summary ###
1015
+ ### Cancellation design summary ### {#design-cancellation-summary}
1016
1016
1017
1017
The design of cancellation described in this paper is built on top of and extends the `std::stop_token`-based
1018
1018
cancellation facilities added in C++20, first proposed in [[P2175R0]] .
@@ -1037,7 +1037,7 @@ As the caller of `execution::connect` typically has control over the receiver ty
1037
1037
the `execution::get_stop_token()` CPO for that receiver type to return a stop-token that it has control over and that
1038
1038
it can use to communicate a stop-request to the operation once it has started.
1039
1039
1040
- ### Support for cancellation is optional ###
1040
+ ### Support for cancellation is optional ### {#design-cancellation-optional}
1041
1041
1042
1042
Support for cancellation is optional, both on part of the author of the receiver and on part of the author of the sender.
1043
1043
@@ -1056,7 +1056,7 @@ naturally and the stop-request being made. If the operation has already complete
1056
1056
it can be cancelled when the stop-request is sent then the stop-request may just be ignored. An application
1057
1057
will typically need to be able to cope with senders that might ignore a stop-request anyway.
1058
1058
1059
- ### Cancellation is inherently racy ###
1059
+ ### Cancellation is inherently racy ### {#design-cancellation-racy}
1060
1060
1061
1061
Usually, an operation will attach a stop-callback at some point inside the call to `execution::start()` so that
1062
1062
a subsequent stop-request will interrupt the logic.
@@ -1083,7 +1083,7 @@ receiver's completion-signalling operation to the `execution::start()` call (whi
1083
1083
1084
1084
For an example of an implementation strategy for solving these data-races see the `async_recv()` example in Appendix A.
1085
1085
1086
- ### Cancellation design status ###
1086
+ ### Cancellation design status ### {#design-cancellation-status}
1087
1087
1088
1088
This paper currently includes the design for cancellation as proposed in
1089
1089
[[P2175R0]] - "Composable cancellation for sender-based async operations".
@@ -3847,9 +3847,9 @@ from the operation before the operation completes.
3847
3847
</pre>
3848
3848
3849
3849
3850
- # Appendix A - Cancellation Examples
3850
+ # Appendix A - Cancellation Examples # {#appendix-a-cancellation-examples}
3851
3851
3852
- ## Cancellation Example: Socket `async_recv()` ###
3852
+ ## Cancellation Example: Socket `async_recv()` ### {#appendix-a-async_recv}
3853
3853
3854
3854
To get a better feel for how this interface might be used by low-level operations see this example implementation
3855
3855
of a cancellable `async_recv()` operation for a Windows Socket.
0 commit comments