Skip to content

Commit f9bd231

Browse files
committed
Deploying to gh-pages from @ c0df5e9 🚀
1 parent fdf9c80 commit f9bd231

File tree

1 file changed

+147
-30
lines changed

1 file changed

+147
-30
lines changed

md_docs_overview.html

Lines changed: 147 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,7 @@ <h2><a class="anchor" id="autotoc_md5"></a>
525525
<li>
526526
the result of the expression satisfies <code><em>simple-allocator</em></code>. </li>
527527
</ul>
528-
<p>Otherwise the expression is ill-formed. </p>
529-
</details>
530-
<div> <details >
528+
<p>Otherwise the expression is ill-formed. </p><div> <details >
531529
<summary >
532530
Example</summary>
533531
<p>This example shows how to define an environment class which provides a <a href="‘#get-allocator’"><code>get_allocator</code></a> query. The objects stores a <code>std::pmr::memory_resource*</code> and returns a correspondingly initialized <code>std::pmr::polymorphic_allocator&lt;&gt;</code>.</p>
@@ -539,7 +537,8 @@ <h2><a class="anchor" id="autotoc_md5"></a>
539537
<div class="line"> }</div>
540538
<div class="line">};</div>
541539
</div><!-- fragment --> </details>
542-
</div> <details >
540+
</div> </details>
541+
<details >
543542
<summary >
544543
<code>get_completion_scheduler&lt;&lt;iTtag&gt;(<em>env</em>) -&gt; <em>scheduler</em></code></summary>
545544
<p><b>Default</b>: <em>none</em> <br />
@@ -652,8 +651,8 @@ <h2><a class="anchor" id="autotoc_md6"></a>
652651
Customization Point Objects</h2>
653652
<details >
654653
<summary >
655-
<code>connect(<em>sender, receiver</em>) -&gt; <em>operation_state</em></code></summary>
656-
<p></p>
654+
<code>connect(<em>sender</em>, <em>receiver</em>) -&gt; <em>operation_state</em></code></summary>
655+
<p>The expresion <code>connect(<em>sender</em>, <em>receiver</em>)</code> combines <code><em>sender</em></code> and <code><em>receiver</em></code> into an operation state <code><em>state</em></code>. When this <code><em>state</em></code> gets started using <code>start(<em>state</em>)</code> the operation represented by <code><em>sender</em></code> gets started and reports its completion to <code><em>receiver</em></code> or an object copied or moved from <code><em>receiver</em></code>. While the operation state <code><em>state</em></code> isn’t started it can be destroyed but once it got started it needs to stay valid until one of the completion signals is called on <code><em>receiver</em></code>. </p>
657656
</details>
658657
<details >
659658
<summary >
@@ -679,34 +678,152 @@ <h2><a class="anchor" id="autotoc_md7"></a>
679678
Senders</h2>
680679
<h3><a class="anchor" id="autotoc_md8"></a>
681680
Sender Factories</h3>
682-
<ul>
683-
<li><code>just(<em>value...</em>) -&gt; <em>sender-of</em>&lt;set_value_t(<em>Value...</em>)&gt;</code></li>
684-
<li><code>just_error(<em>error</em>) -&gt; <em>sender-of</em>&lt;set_error_t(<em>Error</em>)&gt;</code></li>
685-
<li><code>just_stopped() -&gt; <em>sender-of</em>&lt;set_stopped_t()&gt;</code></li>
686-
<li><code>read_env(<em>query</em>) -&gt; <em>sender-of</em>&lt;set_value_t(<em>query-result</em>)&gt;</code></li>
687-
<li><code>schedule(<em>scheduler</em>) -&gt; <em>sender-of</em>&lt;set_value_t()&gt;</code></li>
681+
<p>Sender factories create a sender which forms the start of a graph of lazy work items.</p>
682+
<details >
683+
<summary >
684+
<code>just(<em>value...</em>) -&gt; <em>sender-of</em>&lt;set_value_t(<em>Value...</em>)&gt;</code></summary>
685+
<p>The expression <code>just(<em>value...</em>)</code> creates a sender which sends <code><em>value...</em></code> on the <code>set_value</code> (success) channel when started (note that <code><em>value...</em></code> can be empty).</p>
686+
<p><b>Completions</b> </p><ul>
687+
<li>
688+
<code>set_value_t(decltype(<em>value</em>)...)</code> </li>
689+
</ul>
690+
</details>
691+
<details >
692+
<summary >
693+
<code>just_error(<em>error</em>) -&gt; <em>sender-of</em>&lt;set_error_t(<em>Error</em>)&gt;</code></summary>
694+
<p>The expression <code>just_error(<em>error</em>)</code> creates a sender which sends <code><em>error</em></code> on the <code>set_error</code> (failure) channel when started.</p>
695+
<p><b>Completions</b> </p><ul>
696+
<li>
697+
<code>set_error_t(decltype(<em>error</em>))</code> </li>
688698
</ul>
699+
</details>
700+
<details >
701+
<summary >
702+
<code>just_stopped() -&gt; <em>sender-of</em>&lt;set_stopped_t()&gt;</code></summary>
703+
<p>The expression <code>just_stopped()</code> creates a sender which sends a completion on the <code>set_stopped</code> (cancellation) channel when started.</p>
704+
<p><b>Completions</b> </p><ul>
705+
<li>
706+
<code>set_stopped_t()</code> </li>
707+
</ul>
708+
</details>
709+
<details >
710+
<summary >
711+
<code>read_env(<em>query</em>) -&gt; <em>sender-of</em>&lt;set_value_t(<em>query-result</em>)&gt;</code></summary>
712+
<p>The expression <code>read_env(<em>query</em>)</code> creates a sender which sends the result of querying <code><em>query</em></code> the environment of the <code><em>receiver</em></code> it gets connected to on the <code>set_value</code> channel when started. Put differently, it calls <code>set_value(move(<em>receiver</em>), <em>query</em>(get_env(<em>receiver</em>)))</code>. For example, in a coroutine it may be useful to extra the stop token associated with the coroutine which can be done using <code>read_env</code>:</p>
713+
<div class="fragment"><div class="line"> {c++\}</div>
714+
<div class="line">auto token = co_await read_env(get_stop_token);</div>
715+
</div><!-- fragment --><p><b>Completions</b> </p><ul>
716+
<li>
717+
<code>set_value_t(decltype(<em>query</em>(get_env(<em>receiver</em>))))</code> </li>
718+
</ul>
719+
</details>
720+
<details >
721+
<summary >
722+
<code>schedule(<em>scheduler</em>) -&gt; <em>sender-of</em>&lt;set_value_t()&gt;</code></summary>
723+
<p>The expression <code>schedule(<em>scheduler</em>)</code> creates a sender which upon success completes on the <code>set_value</code> channel without any arguments running on the execution context associated with <code><em>scheduler</em></code>. Depending on the scheduler it is possible that the sender can complete with an error if the scheduling fails or using <code>set_stopped()</code> if the operation gets cancelled before it is successful.</p>
724+
<p><b>Completions</b> </p><ul>
725+
<li>
726+
<code>set_value_t()</code> upon success </li>
727+
<li>
728+
<code>set_error_t(<em>Error</em>)</code> upon failure if <code><em>scheduler</em></code> may fail </li>
729+
<li>
730+
<code>set_stopped_t()</code> upon cancellation if <code><em>scheduler</em></code> supports cancellation </li>
731+
</ul>
732+
</details>
689733
<h3><a class="anchor" id="autotoc_md9"></a>
690734
Sender Adaptors</h3>
691-
<ul>
692-
<li><code>bulk</code></li>
693-
<li><code>continues_on(<em>sender</em>, <em>scheduler</em>) -&gt; <em>sender</em></code></li>
694-
<li><code>into_variant(<em>sender</em>) -&gt; <em>sender-of</em>&lt;set_value_t(std::variant&lt;T...&gt;)&gt;</code>`</li>
695-
<li><code>let_error(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></li>
696-
<li><code>let_stopped(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></li>
697-
<li><code>let_value(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></li>
698-
<li><code>on</code></li>
699-
<li><code>schedule_from(<em>scheduler</em>, <em>sender</em>) -&gt; <em>sender</em></code></li>
700-
<li><code>split</code></li>
701-
<li><code>starts_on(<em>scheduler</em>, <em>sender</em>) -&gt; <em>sender</em></code></li>
702-
<li><code>stopped_as_error</code></li>
703-
<li><code>stopped_as_optional</code></li>
704-
<li><code>then(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></li>
705-
<li><code>upon_error(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></li>
706-
<li><code>upon_stopped(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></li>
707-
<li><code>when_all(<em>sender</em>...) -&gt; <em>sender</em></code></li>
708-
<li><code>when_all_with_variant(<em>sender</em>...) -&gt; <em>sender</em></code></li>
735+
<p>The sender adaptors take one or more senders and adapt their respective behavior to complete with a corresponding result. The description uses the informal function <code><em>completions-of</em>(<em>sender</em>)</code> to represent the completion signatures which <code><em>sender</em></code> produces. Also, completion signatures are combined using <code>+</code>: the result is the deduplicated set of the combined completion signatures.</p>
736+
<details >
737+
<summary >
738+
<code>bulk</code></summary>
739+
<p></p>
740+
</details>
741+
<details >
742+
<summary >
743+
<code>continues_on(<em>sender</em>, <em>scheduler</em>) -&gt; <em>sender-of</em>&lt;<em>completions-of</em>(<em>sender</em>) + <em>completions-of</em>(schedule(<em>scheduler</em>))&gt;</code></summary>
744+
<p>The expression <code>continues_on(<em>sender</em>, <em>scheduler</em>)</code> creates a sender <code><em>cs</em></code> which starts <code><em>sender</em></code> when started. The results from <code><em>sender</em></code> are stored. Once that is <code><em>cs</em></code> creates a sender using <code>schedule(<em>scheduler</em>)</code> and completes itself on the execution once that sender completes.</p>
745+
<p><b>Completions</b> </p><ul>
746+
<li>
747+
<code><em>completions-of</em>(<em>sender</em>)</code> </li>
748+
<li>
749+
<code><em>completions-of</em>(schedule(<em>scheduler</em>))</code> </li>
709750
</ul>
751+
</details>
752+
<details >
753+
<summary >
754+
<code>into_variant(<em>sender</em>) -&gt; <em>sender-of</em>&lt;set_value_t(std::variant&lt;<em>Tuple</em>...&gt;)&gt;</code></summary>
755+
<p>The expression <code>into_variant(<em>sender</em>)</code> creates a sender which transforms the results of possibly multiple <code>set_value</code> completions of <code><em>sender</em></code> into one <code>set_value</code> completion respresenting the different upstream results as different options of a <code>variant&lt;<em>Tuple</em>...&gt;</code> where each <code><em>Tuple</em></code> is a <code>tuple</code> of values initialized with the respective arguments passed to <code>set_value</code>. The order of options in the <code>variant</code> isn’t specified. </p>
756+
</details>
757+
<details >
758+
<summary >
759+
<code>let_error(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></summary>
760+
<p></p>
761+
</details>
762+
<details >
763+
<summary >
764+
<code>let_stopped(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></summary>
765+
<p></p>
766+
</details>
767+
<details >
768+
<summary >
769+
<code>let_value(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></summary>
770+
<p></p>
771+
</details>
772+
<details >
773+
<summary >
774+
<code>on</code></summary>
775+
<p></p>
776+
</details>
777+
<details >
778+
<summary >
779+
<code>schedule_from(<em>scheduler</em>, <em>sender</em>) -&gt; <em>sender</em></code></summary>
780+
<p></p>
781+
</details>
782+
<details >
783+
<summary >
784+
<code>split</code></summary>
785+
<p></p>
786+
</details>
787+
<details >
788+
<summary >
789+
<code>starts_on(<em>scheduler</em>, <em>sender</em>) -&gt; <em>sender</em></code></summary>
790+
<p></p>
791+
</details>
792+
<details >
793+
<summary >
794+
<code>stopped_as_error</code></summary>
795+
<p></p>
796+
</details>
797+
<details >
798+
<summary >
799+
<code>stopped_as_optional</code></summary>
800+
<p></p>
801+
</details>
802+
<details >
803+
<summary >
804+
<code>then(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></summary>
805+
<p></p>
806+
</details>
807+
<details >
808+
<summary >
809+
<code>upon_error(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></summary>
810+
<p></p>
811+
</details>
812+
<details >
813+
<summary >
814+
<code>upon_stopped(<em>upstream</em>, <em>fun</em>) -&gt; <em>sender</em></code></summary>
815+
<p></p>
816+
</details>
817+
<details >
818+
<summary >
819+
<code>when_all(<em>sender</em>...) -&gt; <em>sender</em></code></summary>
820+
<p></p>
821+
</details>
822+
<details >
823+
<summary >
824+
<code>when_all_with_variant(<em>sender</em>...) -&gt; <em>sender</em></code></summary>
825+
<p></p>
826+
</details>
710827
<h3><a class="anchor" id="autotoc_md10"></a>
711828
Sender Consumers</h3>
712829
<ul>

0 commit comments

Comments
 (0)