You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example shows a sketch of using a <code>stoppable_token<_Token_></code> to cancel an active operation. The computation in this example is represented as `sleep_for`.
271
271
272
272
```c++
@@ -278,11 +278,11 @@ void compute(std::stoppable_token auto token)
278
278
}
279
279
}
280
280
```
281
-
</div>
281
+
</blockquote>
282
282
</details>
283
283
<details>
284
284
<summary>Example: inactive</summary>
285
-
<div>
285
+
<blockquote>
286
286
This example shows how an <code><ahref=‘#operation-state’>operation_state</a></code> can use the <code>callback_type</code> together with a <code>_token_</code> to get notified when cancellation is requested.
The concept <code>unstoppable_token<Token></code> is modeled by a <code>_Token_</code> if <code>stoppable_token<_Token_></code> is true and it can statically be determined that both <code>_token_.stop_requested()</code> and <code>_token_.stop_possible()</code> are `constexpr` epxressions yielding `false`. This concept is primarily used to avoid extra work when using stop tokens which will never indicate that cancellations are requested.
340
-
<div>
340
+
<blockquote>
341
341
<details>
342
342
<summary>Example</summary>
343
343
The concept yields `true` for the <code><a href=‘#never-stop-token’>std::execution::never_stop_token</a></code>:
The queries are used to obtain properties associated with and object. Except <code><ahref=‘#forwarding-query’>forwarding_query</a></code> and <code><ahref=‘#get-env’>get_env</a></code> the queries work on <ahref=‘#environment’>environments</a>.
0 commit comments