1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>execution::bulk_execute</title> 5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../boost_asio.html" title="Boost.Asio"> 8<link rel="up" href="../reference.html" title="Reference"> 9<link rel="prev" href="execution__blocking_t__possibly_t/value.html" title="execution::blocking_t::possibly_t::value"> 10<link rel="next" href="execution__bulk_guarantee.html" title="execution::bulk_guarantee"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 15<td align="center"><a href="../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="execution__blocking_t__possibly_t/value.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="execution__bulk_guarantee.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="boost_asio.reference.execution__bulk_execute"></a><a class="link" href="execution__bulk_execute.html" title="execution::bulk_execute">execution::bulk_execute</a> 28</h3></div></div></div> 29<p> 30 <a class="indexterm" name="boost_asio.indexterm.execution__bulk_execute"></a> 31A customisation 32 point that creates a bulk sender. 33 </p> 34<pre class="programlisting">constexpr unspecified bulk_execute = unspecified; 35</pre> 36<p> 37 The name <code class="computeroutput">execution::bulk_execute</code> denotes a customisation point 38 object. If <code class="computeroutput">is_convertible_v<N, size_t></code> is true, then the 39 expression <code class="computeroutput">execution::bulk_execute(S, F, N)</code> for some subexpressions 40 <code class="computeroutput">S</code>, <code class="computeroutput">F</code>, and <code class="computeroutput">N</code> is expression-equivalent 41 to: 42 </p> 43<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 44<li class="listitem"> 45 <code class="computeroutput">S.bulk_execute(F, N)</code>, if that expression is valid. If the 46 function selected does not execute <code class="computeroutput">N</code> invocations of the 47 function object <code class="computeroutput">F</code> on the executor <code class="computeroutput">S</code> in bulk 48 with forward progress guarantee <code class="computeroutput">boost::asio::query(S, execution::bulk_guarantee)</code>, 49 and the result of that function does not model <code class="computeroutput">sender<void></code>, 50 the program is ill-formed with no diagnostic required. 51 </li> 52<li class="listitem"> 53 Otherwise, <code class="computeroutput">bulk_execute(S, F, N)</code>, if that expression is 54 valid, with overload resolution performed in a context that includes 55 the declaration <code class="computeroutput">void bulk_execute();</code> and that does not include 56 a declaration of <code class="computeroutput">execution::bulk_execute</code>. If the function 57 selected by overload resolution does not execute <code class="computeroutput">N</code> invocations 58 of the function object <code class="computeroutput">F</code> on the executor <code class="computeroutput">S</code> 59 in bulk with forward progress guarantee <code class="computeroutput">boost::asio::query(E, execution::bulk_guarantee)</code>, 60 and the result of that function does not model <code class="computeroutput">sender<void></code>, 61 the program is ill-formed with no diagnostic required. 62 </li> 63<li class="listitem"> 64 Otherwise, if the types <code class="computeroutput">F</code> and <code class="computeroutput">executor_index_t<remove_cvref_t<S>></code> 65 model <code class="computeroutput">invocable</code> and if <code class="computeroutput">boost::asio::query(S, execution::bulk_guarantee)</code> 66 equals <code class="computeroutput">execution::bulk_guarantee.unsequenced</code>, then 67 </li> 68<li class="listitem"> 69 Evaluates <code class="computeroutput">DECAY_COPY(std::forward<decltype(F)>(F))</code> 70 on the calling thread to create a function object <code class="computeroutput">cf</code>. [Note: 71 Additional copies of <code class="computeroutput">cf</code> may subsequently be created. --end 72 note.] 73 </li> 74<li class="listitem"> 75 For each value of <code class="computeroutput">i</code> in <code class="computeroutput">N</code>, <code class="computeroutput">cf(i)</code> 76 (or copy of <code class="computeroutput">cf</code>)) will be invoked at most once by an execution 77 agent that is unique for each value of <code class="computeroutput">i</code>. 78 </li> 79<li class="listitem"> 80 May block pending completion of one or more invocations of <code class="computeroutput">cf</code>. 81 </li> 82<li class="listitem"> 83 Synchronizes with (C++Std [intro.multithread]) the invocations of <code class="computeroutput">cf</code>. 84 </li> 85<li class="listitem"> 86 Otherwise, <code class="computeroutput">execution::bulk_execute(S, F, N)</code> is ill-formed. 87 </li> 88</ul></div> 89<h5> 90<a name="boost_asio.reference.execution__bulk_execute.h0"></a> 91 <span class="phrase"><a name="boost_asio.reference.execution__bulk_execute.requirements"></a></span><a class="link" href="execution__bulk_execute.html#boost_asio.reference.execution__bulk_execute.requirements">Requirements</a> 92 </h5> 93<p> 94 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/execution/bulk_execute.hpp</code> 95 </p> 96<p> 97 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio/execution.hpp</code> 98 </p> 99</div> 100<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 101<td align="left"></td> 102<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 103 Kohlhoff<p> 104 Distributed under the Boost Software License, Version 1.0. (See accompanying 105 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 106 </p> 107</div></td> 108</tr></table> 109<hr> 110<div class="spirit-nav"> 111<a accesskey="p" href="execution__blocking_t__possibly_t/value.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="execution__bulk_guarantee.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 112</div> 113</body> 114</html> 115