[DEV] add v1.76.0

This commit is contained in:
2021-10-05 21:37:46 +02:00
parent a97e9ae7d4
commit d0115b733d
45133 changed files with 4744437 additions and 1026325 deletions

View File

@@ -0,0 +1,97 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::~io_context</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="wrap.html" title="io_context::wrap">
<link rel="next" href="../io_context__basic_executor_type.html" title="io_context::basic_executor_type">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="wrap.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="../io_context__basic_executor_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context._io_context"></a><a class="link" href="_io_context.html" title="io_context::~io_context">io_context::~io_context</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context._io_context"></a>
Destructor.
</p>
<pre class="programlisting">~io_context();
</pre>
<p>
On destruction, the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
performs the following sequence of operations:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
For each service object <code class="computeroutput">svc</code> in the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
set, in reverse order of the beginning of service object lifetime,
performs <code class="computeroutput">svc-&gt;shutdown()</code>.
</li>
<li class="listitem">
Uninvoked handler objects that were scheduled for deferred invocation
on the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>,
or any associated strand, are destroyed.
</li>
<li class="listitem">
For each service object <code class="computeroutput">svc</code> in the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
set, in reverse order of the beginning of service object lifetime,
performs <code class="computeroutput">delete static_cast&lt;io_context::service*&gt;(svc)</code>.
</li>
</ul></div>
<h6>
<a name="boost_asio.reference.io_context._io_context.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context._io_context.remarks"></a></span><a class="link" href="_io_context.html#boost_asio.reference.io_context._io_context.remarks">Remarks</a>
</h6>
<p>
The destruction sequence described above permits programs to simplify their
resource management by using <code class="computeroutput">shared_ptr&lt;&gt;</code>. Where an
object's lifetime is tied to the lifetime of a connection (or some other
sequence of asynchronous operations), a <code class="computeroutput">shared_ptr</code> to the
object would be bound into the handlers for all asynchronous operations
associated with it. This works as follows:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
When a single connection ends, all associated asynchronous operations
complete. The corresponding handler objects are destroyed, and all
<code class="computeroutput">shared_ptr</code> references to the objects are destroyed.
</li>
<li class="listitem">
To shut down the whole program, the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
function <code class="computeroutput">stop()</code> is called to terminate any <code class="computeroutput">run()</code>
calls as soon as possible. The <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
destructor defined above destroys all handlers, causing all <code class="computeroutput">shared_ptr</code>
references to all connection objects to be destroyed.
</li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="wrap.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="../io_context__basic_executor_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,118 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::add_service</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="../io_context.html" title="io_context">
<link rel="next" href="count_type.html" title="io_context::count_type">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../io_context.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="count_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.add_service"></a><a class="link" href="add_service.html" title="io_context::add_service">io_context::add_service</a>
</h4></div></div></div>
<p>
<span class="emphasis"><em>Inherited from execution_context.</em></span>
</p>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.add_service"></a>
(Deprecated:
Use <code class="computeroutput">make_service()</code>.) Add a service object to the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>.
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../Service.html" title="Service requirements">Service</a>&gt;
friend void add_service(
execution_context &amp; e,
Service * svc);
</pre>
<p>
This function is used to add a service to the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>.
</p>
<h6>
<a name="boost_asio.reference.io_context.add_service.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.add_service.parameters"></a></span><a class="link" href="add_service.html#boost_asio.reference.io_context.add_service.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">e</span></dt>
<dd><p>
The <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
object that owns the service.
</p></dd>
<dt><span class="term">svc</span></dt>
<dd>
<p>
The service object. On success, ownership of the service object is
transferred to the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>.
When the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
object is destroyed, it will destroy the service object by performing:
</p>
<pre class="programlisting">delete static_cast&lt;execution_context::service*&gt;(svc)
</pre>
<p>
</p>
</dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.add_service.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.add_service.exceptions"></a></span><a class="link" href="add_service.html#boost_asio.reference.io_context.add_service.exceptions">Exceptions</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">boost::asio::service_already_exists</span></dt>
<dd><p>
Thrown if a service of the given type is already present in the
<a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>.
</p></dd>
<dt><span class="term">boost::asio::invalid_service_owner</span></dt>
<dd><p>
Thrown if the service's owning <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
is not the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
object specified by the <code class="computeroutput">e</code> parameter.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.add_service.h2"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.add_service.requirements"></a></span><a class="link" href="add_service.html#boost_asio.reference.io_context.add_service.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/io_context.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../io_context.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="count_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::count_type</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="add_service.html" title="io_context::add_service">
<link rel="next" href="destroy.html" title="io_context::destroy">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="add_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="destroy.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.count_type"></a><a class="link" href="count_type.html" title="io_context::count_type">io_context::count_type</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.count_type"></a>
The type
used to count the number of handlers executed by the context.
</p>
<pre class="programlisting">typedef std::size_t count_type;
</pre>
<h6>
<a name="boost_asio.reference.io_context.count_type.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.count_type.requirements"></a></span><a class="link" href="count_type.html#boost_asio.reference.io_context.count_type.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/io_context.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="add_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="destroy.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,62 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::destroy</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="count_type.html" title="io_context::count_type">
<link rel="next" href="dispatch.html" title="io_context::dispatch">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="count_type.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="dispatch.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.destroy"></a><a class="link" href="destroy.html" title="io_context::destroy">io_context::destroy</a>
</h4></div></div></div>
<p>
<span class="emphasis"><em>Inherited from execution_context.</em></span>
</p>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.destroy"></a>
Destroys all services
in the context.
</p>
<pre class="programlisting">void destroy();
</pre>
<p>
This function is implemented as follows:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
For each service object <code class="computeroutput">svc</code> in the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
set, in reverse order * of the beginning of service object lifetime,
performs <code class="computeroutput">delete static_cast&lt;execution_context::service*&gt;(svc)</code>.
</li></ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="count_type.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="dispatch.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,106 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::dispatch</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="destroy.html" title="io_context::destroy">
<link rel="next" href="executor_type.html" title="io_context::executor_type">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="destroy.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="executor_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.dispatch"></a><a class="link" href="dispatch.html" title="io_context::dispatch">io_context::dispatch</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.dispatch"></a>
(Deprecated:
Use <a class="link" href="../dispatch.html" title="dispatch"><code class="computeroutput">dispatch</code></a>.)
Request the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
to invoke the given handler.
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../LegacyCompletionHandler.html" title="Legacy completion handler requirements">LegacyCompletionHandler</a>&gt;
<a class="link" href="../asynchronous_operations.html#boost_asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type"><span class="emphasis"><em>DEDUCED</em></span></a> dispatch(
LegacyCompletionHandler &amp;&amp; handler);
</pre>
<p>
This function is used to ask the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
to execute the given handler.
</p>
<p>
The <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
guarantees that the handler will only be called in a thread in which the
<code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code> or <code class="computeroutput">poll_one()</code>
member functions is currently being invoked. The handler may be executed
inside this function if the guarantee can be met.
</p>
<h6>
<a name="boost_asio.reference.io_context.dispatch.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.dispatch.parameters"></a></span><a class="link" href="dispatch.html#boost_asio.reference.io_context.dispatch.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">handler</span></dt>
<dd>
<p>
The handler to be called. The <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
will make a copy of the handler object as required. The function
signature of the handler must be:
</p>
<pre class="programlisting">void handler();
</pre>
<p>
</p>
</dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.dispatch.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.dispatch.remarks"></a></span><a class="link" href="dispatch.html#boost_asio.reference.io_context.dispatch.remarks">Remarks</a>
</h6>
<p>
This function throws an exception only if:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
the handler's <code class="computeroutput">asio_handler_allocate</code> function; or
</li>
<li class="listitem">
the handler's copy constructor
</li>
</ul></div>
<p>
throws an exception.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="destroy.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="executor_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,314 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::executor_type</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="dispatch.html" title="io_context::dispatch">
<link rel="next" href="fork_event.html" title="io_context::fork_event">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="dispatch.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="fork_event.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.executor_type"></a><a class="link" href="executor_type.html" title="io_context::executor_type">io_context::executor_type</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.executor_type"></a>
Executor
used to submit functions to an <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
</p>
<pre class="programlisting">typedef basic_executor_type&lt; std::allocator&lt; void &gt;, 0 &gt; executor_type;
</pre>
<h6>
<a name="boost_asio.reference.io_context.executor_type.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.executor_type.member_functions"></a></span><a class="link" href="executor_type.html#boost_asio.reference.io_context.executor_type.member_functions">Member
Functions</a>
</h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/basic_executor_type.html" title="io_context::basic_executor_type::basic_executor_type"><span class="bold"><strong>basic_executor_type</strong></span></a> <span class="silver">[constructor]</span>
</p>
</td>
<td>
<p>
Copy constructor. <br> <span class="silver"></span><br> Move constructor.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/context.html" title="io_context::basic_executor_type::context"><span class="bold"><strong>context</strong></span></a>
</p>
</td>
<td>
<p>
Obtain the underlying execution context.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/defer.html" title="io_context::basic_executor_type::defer"><span class="bold"><strong>defer</strong></span></a>
</p>
</td>
<td>
<p>
Request the io_context to invoke the given function object.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/dispatch.html" title="io_context::basic_executor_type::dispatch"><span class="bold"><strong>dispatch</strong></span></a>
</p>
</td>
<td>
<p>
Request the io_context to invoke the given function object.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/execute.html" title="io_context::basic_executor_type::execute"><span class="bold"><strong>execute</strong></span></a>
</p>
</td>
<td>
<p>
Execution function.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/on_work_finished.html" title="io_context::basic_executor_type::on_work_finished"><span class="bold"><strong>on_work_finished</strong></span></a>
</p>
</td>
<td>
<p>
Inform the io_context that some work is no longer outstanding.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/on_work_started.html" title="io_context::basic_executor_type::on_work_started"><span class="bold"><strong>on_work_started</strong></span></a>
</p>
</td>
<td>
<p>
Inform the io_context that it has some outstanding work to do.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/operator_eq_.html" title="io_context::basic_executor_type::operator="><span class="bold"><strong>operator=</strong></span></a>
</p>
</td>
<td>
<p>
Assignment operator. <br> <span class="silver"></span><br> Move assignment operator.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/post.html" title="io_context::basic_executor_type::post"><span class="bold"><strong>post</strong></span></a>
</p>
</td>
<td>
<p>
Request the io_context to invoke the given function object.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/query.html" title="io_context::basic_executor_type::query"><span class="bold"><strong>query</strong></span></a>
</p>
</td>
<td>
<p>
Query the current value of the context property. <br> <span class="silver"></span><br>
Query the current value of the blocking property. <br> <span class="silver"></span><br>
Query the current value of the relationship property. <br>
<span class="silver"></span><br> Query the current value of the allocator property.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/query__static.html" title="io_context::basic_executor_type::query"><span class="bold"><strong>query</strong></span></a> <span class="silver">[static]</span>
</p>
</td>
<td>
<p>
Query the current value of the mapping property. <br> <span class="silver"></span><br>
Query the current value of the outstanding_work property.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/require.html" title="io_context::basic_executor_type::require"><span class="bold"><strong>require</strong></span></a>
</p>
</td>
<td>
<p>
Obtain an executor with the blocking.possibly property. <br>
<span class="silver"></span><br> Obtain an executor with the blocking.never property.
<br> <span class="silver"></span><br> Obtain an executor with the relationship.fork property.
<br> <span class="silver"></span><br> Obtain an executor with the relationship.continuation
property. <br> <span class="silver"></span><br> Obtain an executor with the outstanding_work.tracked
property. <br> <span class="silver"></span><br> Obtain an executor with the outstanding_work.untracked
property. <br> <span class="silver"></span><br> Obtain an executor with the specified
allocator property. <br> <span class="silver"></span><br> Obtain an executor with the
default allocator property.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/running_in_this_thread.html" title="io_context::basic_executor_type::running_in_this_thread"><span class="bold"><strong>running_in_this_thread</strong></span></a>
</p>
</td>
<td>
<p>
Determine whether the io_context is running in the current thread.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/_basic_executor_type.html" title="io_context::basic_executor_type::~basic_executor_type"><span class="bold"><strong>~basic_executor_type</strong></span></a> <span class="silver">[destructor]</span>
</p>
</td>
<td>
<p>
Destructor.
</p>
</td>
</tr>
</tbody>
</table></div>
<h6>
<a name="boost_asio.reference.io_context.executor_type.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.executor_type.friends"></a></span><a class="link" href="executor_type.html#boost_asio.reference.io_context.executor_type.friends">Friends</a>
</h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/operator_not__eq_.html" title="io_context::basic_executor_type::operator!="><span class="bold"><strong>operator!=</strong></span></a>
</p>
</td>
<td>
<p>
Compare two executors for inequality.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../io_context__basic_executor_type/operator_eq__eq_.html" title="io_context::basic_executor_type::operator=="><span class="bold"><strong>operator==</strong></span></a>
</p>
</td>
<td>
<p>
Compare two executors for equality.
</p>
</td>
</tr>
</tbody>
</table></div>
<h6>
<a name="boost_asio.reference.io_context.executor_type.h2"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.executor_type.requirements"></a></span><a class="link" href="executor_type.html#boost_asio.reference.io_context.executor_type.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/io_context.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="dispatch.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="fork_event.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,80 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::fork_event</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="executor_type.html" title="io_context::executor_type">
<link rel="next" href="get_executor.html" title="io_context::get_executor">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="executor_type.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="get_executor.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.fork_event"></a><a class="link" href="fork_event.html" title="io_context::fork_event">io_context::fork_event</a>
</h4></div></div></div>
<p>
<span class="emphasis"><em>Inherited from execution_context.</em></span>
</p>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.fork_event"></a>
Fork-related
event notifications.
</p>
<pre class="programlisting">enum fork_event
</pre>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.fork_event.fork_prepare"></a>
<a class="indexterm" name="boost_asio.indexterm.io_context.fork_event.fork_parent"></a>
<a class="indexterm" name="boost_asio.indexterm.io_context.fork_event.fork_child"></a>
</p>
<h6>
<a name="boost_asio.reference.io_context.fork_event.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.fork_event.values"></a></span><a class="link" href="fork_event.html#boost_asio.reference.io_context.fork_event.values">Values</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">fork_prepare</span></dt>
<dd><p>
Notify the context that the process is about to fork.
</p></dd>
<dt><span class="term">fork_parent</span></dt>
<dd><p>
Notify the context that the process has forked and is the parent.
</p></dd>
<dt><span class="term">fork_child</span></dt>
<dd><p>
Notify the context that the process has forked and is the child.
</p></dd>
</dl>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="executor_type.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="get_executor.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,51 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::get_executor</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="fork_event.html" title="io_context::fork_event">
<link rel="next" href="has_service.html" title="io_context::has_service">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="fork_event.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="has_service.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.get_executor"></a><a class="link" href="get_executor.html" title="io_context::get_executor">io_context::get_executor</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.get_executor"></a>
Obtains
the executor associated with the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
</p>
<pre class="programlisting">executor_type get_executor();
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="fork_event.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="has_service.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,95 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::has_service</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="get_executor.html" title="io_context::get_executor">
<link rel="next" href="io_context.html" title="io_context::io_context">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="get_executor.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="io_context.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.has_service"></a><a class="link" href="has_service.html" title="io_context::has_service">io_context::has_service</a>
</h4></div></div></div>
<p>
<span class="emphasis"><em>Inherited from execution_context.</em></span>
</p>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.has_service"></a>
Determine
if an <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
contains a specified service type.
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../Service.html" title="Service requirements">Service</a>&gt;
friend bool has_service(
execution_context &amp; e);
</pre>
<p>
This function is used to determine whether the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
contains a service object corresponding to the given service type.
</p>
<h6>
<a name="boost_asio.reference.io_context.has_service.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.has_service.parameters"></a></span><a class="link" href="has_service.html#boost_asio.reference.io_context.has_service.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">e</span></dt>
<dd><p>
The <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
object that owns the service.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.has_service.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.has_service.return_value"></a></span><a class="link" href="has_service.html#boost_asio.reference.io_context.has_service.return_value">Return
Value</a>
</h6>
<p>
A boolean indicating whether the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
contains the service.
</p>
<h6>
<a name="boost_asio.reference.io_context.has_service.h2"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.has_service.requirements"></a></span><a class="link" href="has_service.html#boost_asio.reference.io_context.has_service.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/io_context.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="get_executor.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="io_context.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,55 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::io_context</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="has_service.html" title="io_context::has_service">
<link rel="next" href="io_context/overload1.html" title="io_context::io_context (1 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="io_context/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.io_context"></a><a class="link" href="io_context.html" title="io_context::io_context">io_context::io_context</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.io_context"></a>
Constructor.
</p>
<pre class="programlisting"><a class="link" href="io_context/overload1.html" title="io_context::io_context (1 of 2 overloads)">io_context</a>();
<span class="emphasis"><em>» <a class="link" href="io_context/overload1.html" title="io_context::io_context (1 of 2 overloads)">more...</a></em></span>
explicit <a class="link" href="io_context/overload2.html" title="io_context::io_context (2 of 2 overloads)">io_context</a>(
int concurrency_hint);
<span class="emphasis"><em>» <a class="link" href="io_context/overload2.html" title="io_context::io_context (2 of 2 overloads)">more...</a></em></span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="io_context/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::io_context (1 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context::io_context">
<link rel="prev" href="../io_context.html" title="io_context::io_context">
<link rel="next" href="overload2.html" title="io_context::io_context (2 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../io_context.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.io_context.overload1"></a><a class="link" href="overload1.html" title="io_context::io_context (1 of 2 overloads)">io_context::io_context
(1 of 2 overloads)</a>
</h5></div></div></div>
<p>
Constructor.
</p>
<pre class="programlisting">io_context();
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../io_context.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,68 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::io_context (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context::io_context">
<link rel="prev" href="overload1.html" title="io_context::io_context (1 of 2 overloads)">
<link rel="next" href="../make_service.html" title="io_context::make_service">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="../make_service.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.io_context.overload2"></a><a class="link" href="overload2.html" title="io_context::io_context (2 of 2 overloads)">io_context::io_context
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
Constructor.
</p>
<pre class="programlisting">io_context(
int concurrency_hint);
</pre>
<p>
Construct with a hint about the required level of concurrency.
</p>
<h6>
<a name="boost_asio.reference.io_context.io_context.overload2.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.io_context.overload2.parameters"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.io_context.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">concurrency_hint</span></dt>
<dd><p>
A suggestion to the implementation on how many threads it should
allow to run simultaneously.
</p></dd>
</dl>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="../make_service.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,104 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::make_service</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="io_context/overload2.html" title="io_context::io_context (2 of 2 overloads)">
<link rel="next" href="notify_fork.html" title="io_context::notify_fork">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="io_context/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="notify_fork.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.make_service"></a><a class="link" href="make_service.html" title="io_context::make_service">io_context::make_service</a>
</h4></div></div></div>
<p>
<span class="emphasis"><em>Inherited from execution_context.</em></span>
</p>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.make_service"></a>
Creates
a service object and adds it to the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>.
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../Service.html" title="Service requirements">Service</a>,
typename... Args&gt;
friend Service &amp; make_service(
execution_context &amp; e,
Args &amp;&amp;... args);
</pre>
<p>
This function is used to add a service to the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>.
</p>
<h6>
<a name="boost_asio.reference.io_context.make_service.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.make_service.parameters"></a></span><a class="link" href="make_service.html#boost_asio.reference.io_context.make_service.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">e</span></dt>
<dd><p>
The <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
object that owns the service.
</p></dd>
<dt><span class="term">args</span></dt>
<dd><p>
Zero or more arguments to be passed to the service constructor.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.make_service.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.make_service.exceptions"></a></span><a class="link" href="make_service.html#boost_asio.reference.io_context.make_service.exceptions">Exceptions</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">boost::asio::service_already_exists</span></dt>
<dd><p>
Thrown if a service of the given type is already present in the
<a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.make_service.h2"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.make_service.requirements"></a></span><a class="link" href="make_service.html#boost_asio.reference.io_context.make_service.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/io_context.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="io_context/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="notify_fork.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,129 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::notify_fork</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="make_service.html" title="io_context::make_service">
<link rel="next" href="poll.html" title="io_context::poll">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="make_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="poll.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.notify_fork"></a><a class="link" href="notify_fork.html" title="io_context::notify_fork">io_context::notify_fork</a>
</h4></div></div></div>
<p>
<span class="emphasis"><em>Inherited from execution_context.</em></span>
</p>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.notify_fork"></a>
Notify
the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
of a fork-related event.
</p>
<pre class="programlisting">void notify_fork(
fork_event event);
</pre>
<p>
This function is used to inform the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
that the process is about to fork, or has just forked. This allows the
<a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>,
and the services it contains, to perform any necessary housekeeping to
ensure correct operation following a fork.
</p>
<p>
This function must not be called while any other <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
function, or any function associated with the execution_context's derived
class, is being called in another thread. It is, however, safe to call
this function from within a completion handler, provided no other thread
is accessing the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
or its derived class.
</p>
<h6>
<a name="boost_asio.reference.io_context.notify_fork.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.notify_fork.parameters"></a></span><a class="link" href="notify_fork.html#boost_asio.reference.io_context.notify_fork.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">event</span></dt>
<dd><p>
A fork-related event.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.notify_fork.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.notify_fork.exceptions"></a></span><a class="link" href="notify_fork.html#boost_asio.reference.io_context.notify_fork.exceptions">Exceptions</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">boost::system::system_error</span></dt>
<dd><p>
Thrown on failure. If the notification fails the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
object should no longer be used and should be destroyed.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.notify_fork.h2"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.notify_fork.example"></a></span><a class="link" href="notify_fork.html#boost_asio.reference.io_context.notify_fork.example">Example</a>
</h6>
<p>
The following code illustrates how to incorporate the <code class="computeroutput">notify_fork()</code>
function:
</p>
<pre class="programlisting">my_execution_context.notify_fork(execution_context::fork_prepare);
if (fork() == 0)
{
// This is the child process.
my_execution_context.notify_fork(execution_context::fork_child);
}
else
{
// This is the parent process.
my_execution_context.notify_fork(execution_context::fork_parent);
}
</pre>
<h6>
<a name="boost_asio.reference.io_context.notify_fork.h3"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.notify_fork.remarks"></a></span><a class="link" href="notify_fork.html#boost_asio.reference.io_context.notify_fork.remarks">Remarks</a>
</h6>
<p>
For each service object <code class="computeroutput">svc</code> in the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
set, performs <code class="computeroutput">svc-&gt;notify_fork();</code>. When processing the
fork_prepare event, services are visited in reverse order of the beginning
of service object lifetime. Otherwise, services are visited in order of
the beginning of service object lifetime.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="make_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="poll.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::poll</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="notify_fork.html" title="io_context::notify_fork">
<link rel="next" href="poll/overload1.html" title="io_context::poll (1 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="notify_fork.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="poll/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.poll"></a><a class="link" href="poll.html" title="io_context::poll">io_context::poll</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.poll"></a>
Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute ready handlers.
</p>
<pre class="programlisting">count_type <a class="link" href="poll/overload1.html" title="io_context::poll (1 of 2 overloads)">poll</a>();
<span class="emphasis"><em>» <a class="link" href="poll/overload1.html" title="io_context::poll (1 of 2 overloads)">more...</a></em></span>
</pre>
<p>
(Deprecated: Use non-error_code overload.) Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute ready handlers.
</p>
<pre class="programlisting">count_type <a class="link" href="poll/overload2.html" title="io_context::poll (2 of 2 overloads)">poll</a>(
boost::system::error_code &amp; ec);
<span class="emphasis"><em>» <a class="link" href="poll/overload2.html" title="io_context::poll (2 of 2 overloads)">more...</a></em></span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="notify_fork.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="poll/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,64 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::poll (1 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../poll.html" title="io_context::poll">
<link rel="prev" href="../poll.html" title="io_context::poll">
<link rel="next" href="overload2.html" title="io_context::poll (2 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../poll.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poll.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.poll.overload1"></a><a class="link" href="overload1.html" title="io_context::poll (1 of 2 overloads)">io_context::poll
(1 of 2 overloads)</a>
</h5></div></div></div>
<p>
Run the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute ready handlers.
</p>
<pre class="programlisting">count_type poll();
</pre>
<p>
The <code class="computeroutput">poll()</code> function runs handlers that are ready to run,
without blocking, until the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped or there are no more ready handlers.
</p>
<h6>
<a name="boost_asio.reference.io_context.poll.overload1.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.poll.overload1.return_value"></a></span><a class="link" href="overload1.html#boost_asio.reference.io_context.poll.overload1.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../poll.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poll.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,78 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::poll (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../poll.html" title="io_context::poll">
<link rel="prev" href="overload1.html" title="io_context::poll (1 of 2 overloads)">
<link rel="next" href="../poll_one.html" title="io_context::poll_one">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poll.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="../poll_one.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.poll.overload2"></a><a class="link" href="overload2.html" title="io_context::poll (2 of 2 overloads)">io_context::poll
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
(Deprecated: Use non-error_code overload.) Run the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute ready handlers.
</p>
<pre class="programlisting">count_type poll(
boost::system::error_code &amp; ec);
</pre>
<p>
The <code class="computeroutput">poll()</code> function runs handlers that are ready to run,
without blocking, until the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped or there are no more ready handlers.
</p>
<h6>
<a name="boost_asio.reference.io_context.poll.overload2.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.poll.overload2.parameters"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.poll.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">ec</span></dt>
<dd><p>
Set to indicate what error occurred, if any.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.poll.overload2.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.poll.overload2.return_value"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.poll.overload2.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poll.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="../poll_one.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::poll_one</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="poll/overload2.html" title="io_context::poll (2 of 2 overloads)">
<link rel="next" href="poll_one/overload1.html" title="io_context::poll_one (1 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="poll/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="poll_one/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.poll_one"></a><a class="link" href="poll_one.html" title="io_context::poll_one">io_context::poll_one</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.poll_one"></a>
Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute one ready handler.
</p>
<pre class="programlisting">count_type <a class="link" href="poll_one/overload1.html" title="io_context::poll_one (1 of 2 overloads)">poll_one</a>();
<span class="emphasis"><em>» <a class="link" href="poll_one/overload1.html" title="io_context::poll_one (1 of 2 overloads)">more...</a></em></span>
</pre>
<p>
(Deprecated: Use non-error_code overload.) Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute one ready handler.
</p>
<pre class="programlisting">count_type <a class="link" href="poll_one/overload2.html" title="io_context::poll_one (2 of 2 overloads)">poll_one</a>(
boost::system::error_code &amp; ec);
<span class="emphasis"><em>» <a class="link" href="poll_one/overload2.html" title="io_context::poll_one (2 of 2 overloads)">more...</a></em></span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="poll/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="poll_one/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,63 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::poll_one (1 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../poll_one.html" title="io_context::poll_one">
<link rel="prev" href="../poll_one.html" title="io_context::poll_one">
<link rel="next" href="overload2.html" title="io_context::poll_one (2 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../poll_one.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poll_one.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.poll_one.overload1"></a><a class="link" href="overload1.html" title="io_context::poll_one (1 of 2 overloads)">io_context::poll_one
(1 of 2 overloads)</a>
</h5></div></div></div>
<p>
Run the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute one ready handler.
</p>
<pre class="programlisting">count_type poll_one();
</pre>
<p>
The <code class="computeroutput">poll_one()</code> function runs at most one handler that is
ready to run, without blocking.
</p>
<h6>
<a name="boost_asio.reference.io_context.poll_one.overload1.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.poll_one.overload1.return_value"></a></span><a class="link" href="overload1.html#boost_asio.reference.io_context.poll_one.overload1.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../poll_one.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poll_one.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,77 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::poll_one (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../poll_one.html" title="io_context::poll_one">
<link rel="prev" href="overload1.html" title="io_context::poll_one (1 of 2 overloads)">
<link rel="next" href="../post.html" title="io_context::post">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poll_one.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="../post.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.poll_one.overload2"></a><a class="link" href="overload2.html" title="io_context::poll_one (2 of 2 overloads)">io_context::poll_one
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
(Deprecated: Use non-error_code overload.) Run the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute one ready handler.
</p>
<pre class="programlisting">count_type poll_one(
boost::system::error_code &amp; ec);
</pre>
<p>
The <code class="computeroutput">poll_one()</code> function runs at most one handler that is
ready to run, without blocking.
</p>
<h6>
<a name="boost_asio.reference.io_context.poll_one.overload2.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.poll_one.overload2.parameters"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.poll_one.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">ec</span></dt>
<dd><p>
Set to indicate what error occurred, if any.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.poll_one.overload2.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.poll_one.overload2.return_value"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.poll_one.overload2.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poll_one.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="../post.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,105 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::post</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="poll_one/overload2.html" title="io_context::poll_one (2 of 2 overloads)">
<link rel="next" href="reset.html" title="io_context::reset">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="poll_one/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="reset.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.post"></a><a class="link" href="post.html" title="io_context::post">io_context::post</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.post"></a>
(Deprecated: Use <a class="link" href="../post.html" title="post"><code class="computeroutput">post</code></a>.) Request
the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
to invoke the given handler and return immediately.
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../LegacyCompletionHandler.html" title="Legacy completion handler requirements">LegacyCompletionHandler</a>&gt;
<a class="link" href="../asynchronous_operations.html#boost_asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type"><span class="emphasis"><em>DEDUCED</em></span></a> post(
LegacyCompletionHandler &amp;&amp; handler);
</pre>
<p>
This function is used to ask the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
to execute the given handler, but without allowing the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
to call the handler from inside this function.
</p>
<p>
The <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
guarantees that the handler will only be called in a thread in which the
<code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code> or <code class="computeroutput">poll_one()</code>
member functions is currently being invoked.
</p>
<h6>
<a name="boost_asio.reference.io_context.post.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.post.parameters"></a></span><a class="link" href="post.html#boost_asio.reference.io_context.post.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">handler</span></dt>
<dd>
<p>
The handler to be called. The <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
will make a copy of the handler object as required. The function
signature of the handler must be:
</p>
<pre class="programlisting">void handler();
</pre>
<p>
</p>
</dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.post.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.post.remarks"></a></span><a class="link" href="post.html#boost_asio.reference.io_context.post.remarks">Remarks</a>
</h6>
<p>
This function throws an exception only if:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
the handler's <code class="computeroutput">asio_handler_allocate</code> function; or
</li>
<li class="listitem">
the handler's copy constructor
</li>
</ul></div>
<p>
throws an exception.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="poll_one/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="reset.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,66 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::reset</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="post.html" title="io_context::post">
<link rel="next" href="restart.html" title="io_context::restart">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="post.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="restart.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.reset"></a><a class="link" href="reset.html" title="io_context::reset">io_context::reset</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.reset"></a>
(Deprecated: Use <code class="computeroutput">restart()</code>.)
Reset the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
in preparation for a subsequent <code class="computeroutput">run()</code> invocation.
</p>
<pre class="programlisting">void reset();
</pre>
<p>
This function must be called prior to any second or later set of invocations
of the <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code>
or <code class="computeroutput">poll_one()</code> functions when a previous invocation of these
functions returned due to the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
being stopped or running out of work. After a call to <code class="computeroutput">restart()</code>,
the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's <code class="computeroutput">stopped()</code> function will return <code class="computeroutput">false</code>.
</p>
<p>
This function must not be called while there are any unfinished calls to
the <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code> or
<code class="computeroutput">poll_one()</code> functions.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="post.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="restart.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,65 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::restart</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="reset.html" title="io_context::reset">
<link rel="next" href="run.html" title="io_context::run">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="reset.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.restart"></a><a class="link" href="restart.html" title="io_context::restart">io_context::restart</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.restart"></a>
Restart the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
in preparation for a subsequent <code class="computeroutput">run()</code> invocation.
</p>
<pre class="programlisting">void restart();
</pre>
<p>
This function must be called prior to any second or later set of invocations
of the <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code>
or <code class="computeroutput">poll_one()</code> functions when a previous invocation of these
functions returned due to the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
being stopped or running out of work. After a call to <code class="computeroutput">restart()</code>,
the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's <code class="computeroutput">stopped()</code> function will return <code class="computeroutput">false</code>.
</p>
<p>
This function must not be called while there are any unfinished calls to
the <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code> or
<code class="computeroutput">poll_one()</code> functions.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="reset.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="restart.html" title="io_context::restart">
<link rel="next" href="run/overload1.html" title="io_context::run (1 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="restart.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.run"></a><a class="link" href="run.html" title="io_context::run">io_context::run</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.run"></a>
Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop.
</p>
<pre class="programlisting">count_type <a class="link" href="run/overload1.html" title="io_context::run (1 of 2 overloads)">run</a>();
<span class="emphasis"><em>» <a class="link" href="run/overload1.html" title="io_context::run (1 of 2 overloads)">more...</a></em></span>
</pre>
<p>
(Deprecated: Use non-error_code overload.) Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop.
</p>
<pre class="programlisting">count_type <a class="link" href="run/overload2.html" title="io_context::run (2 of 2 overloads)">run</a>(
boost::system::error_code &amp; ec);
<span class="emphasis"><em>» <a class="link" href="run/overload2.html" title="io_context::run (2 of 2 overloads)">more...</a></em></span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="restart.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,95 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run (1 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../run.html" title="io_context::run">
<link rel="prev" href="../run.html" title="io_context::run">
<link rel="next" href="overload2.html" title="io_context::run (2 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../run.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../run.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.run.overload1"></a><a class="link" href="overload1.html" title="io_context::run (1 of 2 overloads)">io_context::run
(1 of 2 overloads)</a>
</h5></div></div></div>
<p>
Run the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop.
</p>
<pre class="programlisting">count_type run();
</pre>
<p>
The <code class="computeroutput">run()</code> function blocks until all work has finished and
there are no more handlers to be dispatched, or until the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped.
</p>
<p>
Multiple threads may call the <code class="computeroutput">run()</code> function to set up a
pool of threads from which the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
may execute handlers. All threads that are waiting in the pool are equivalent
and the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
may choose any one of them to invoke a handler.
</p>
<p>
A normal exit from the <code class="computeroutput">run()</code> function implies that the
<a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object is stopped (the <code class="computeroutput">stopped()</code> function returns <code class="computeroutput">true</code>).
Subsequent calls to <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code>
or <code class="computeroutput">poll_one()</code> will return immediately unless there is a
prior call to <code class="computeroutput">restart()</code>.
</p>
<h6>
<a name="boost_asio.reference.io_context.run.overload1.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run.overload1.return_value"></a></span><a class="link" href="overload1.html#boost_asio.reference.io_context.run.overload1.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
<h6>
<a name="boost_asio.reference.io_context.run.overload1.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run.overload1.remarks"></a></span><a class="link" href="overload1.html#boost_asio.reference.io_context.run.overload1.remarks">Remarks</a>
</h6>
<p>
Calling the <code class="computeroutput">run()</code> function from a thread that is currently
calling one of <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">run_for()</code>,
<code class="computeroutput">run_until()</code>, <code class="computeroutput">poll()</code> or <code class="computeroutput">poll_one()</code>
on the same <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object may introduce the potential for deadlock. It is the caller's reponsibility
to avoid this.
</p>
<p>
The <code class="computeroutput">poll()</code> function may also be used to dispatch ready handlers,
but without blocking.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../run.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../run.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,109 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../run.html" title="io_context::run">
<link rel="prev" href="overload1.html" title="io_context::run (1 of 2 overloads)">
<link rel="next" href="../run_for.html" title="io_context::run_for">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../run.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="../run_for.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.run.overload2"></a><a class="link" href="overload2.html" title="io_context::run (2 of 2 overloads)">io_context::run
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
(Deprecated: Use non-error_code overload.) Run the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop.
</p>
<pre class="programlisting">count_type run(
boost::system::error_code &amp; ec);
</pre>
<p>
The <code class="computeroutput">run()</code> function blocks until all work has finished and
there are no more handlers to be dispatched, or until the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped.
</p>
<p>
Multiple threads may call the <code class="computeroutput">run()</code> function to set up a
pool of threads from which the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
may execute handlers. All threads that are waiting in the pool are equivalent
and the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
may choose any one of them to invoke a handler.
</p>
<p>
A normal exit from the <code class="computeroutput">run()</code> function implies that the
<a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object is stopped (the <code class="computeroutput">stopped()</code> function returns <code class="computeroutput">true</code>).
Subsequent calls to <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code>
or <code class="computeroutput">poll_one()</code> will return immediately unless there is a
prior call to <code class="computeroutput">restart()</code>.
</p>
<h6>
<a name="boost_asio.reference.io_context.run.overload2.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run.overload2.parameters"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.run.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">ec</span></dt>
<dd><p>
Set to indicate what error occurred, if any.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.run.overload2.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run.overload2.return_value"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.run.overload2.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
<h6>
<a name="boost_asio.reference.io_context.run.overload2.h2"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run.overload2.remarks"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.run.overload2.remarks">Remarks</a>
</h6>
<p>
Calling the <code class="computeroutput">run()</code> function from a thread that is currently
calling one of <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">run_for()</code>,
<code class="computeroutput">run_until()</code>, <code class="computeroutput">poll()</code> or <code class="computeroutput">poll_one()</code>
on the same <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object may introduce the potential for deadlock. It is the caller's reponsibility
to avoid this.
</p>
<p>
The <code class="computeroutput">poll()</code> function may also be used to dispatch ready handlers,
but without blocking.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../run.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="../run_for.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,80 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run_for</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="run/overload2.html" title="io_context::run (2 of 2 overloads)">
<link rel="next" href="run_one.html" title="io_context::run_one">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run_one.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.run_for"></a><a class="link" href="run_for.html" title="io_context::run_for">io_context::run_for</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.run_for"></a>
Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop for a specified duration.
</p>
<pre class="programlisting">template&lt;
typename Rep,
typename Period&gt;
std::size_t run_for(
const chrono::duration&lt; Rep, Period &gt; &amp; rel_time);
</pre>
<p>
The <code class="computeroutput">run_for()</code> function blocks until all work has finished
and there are no more handlers to be dispatched, until the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped, or until the specified duration has elapsed.
</p>
<h6>
<a name="boost_asio.reference.io_context.run_for.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_for.parameters"></a></span><a class="link" href="run_for.html#boost_asio.reference.io_context.run_for.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">rel_time</span></dt>
<dd><p>
The duration for which the call may block.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.run_for.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_for.return_value"></a></span><a class="link" href="run_for.html#boost_asio.reference.io_context.run_for.return_value">Return Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run_one.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run_one</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="run_for.html" title="io_context::run_for">
<link rel="next" href="run_one/overload1.html" title="io_context::run_one (1 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_for.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run_one/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.run_one"></a><a class="link" href="run_one.html" title="io_context::run_one">io_context::run_one</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.run_one"></a>
Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute at most one handler.
</p>
<pre class="programlisting">count_type <a class="link" href="run_one/overload1.html" title="io_context::run_one (1 of 2 overloads)">run_one</a>();
<span class="emphasis"><em>» <a class="link" href="run_one/overload1.html" title="io_context::run_one (1 of 2 overloads)">more...</a></em></span>
</pre>
<p>
(Deprecated: Use non-error_code overlaod.) Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute at most one handler.
</p>
<pre class="programlisting">count_type <a class="link" href="run_one/overload2.html" title="io_context::run_one (2 of 2 overloads)">run_one</a>(
boost::system::error_code &amp; ec);
<span class="emphasis"><em>» <a class="link" href="run_one/overload2.html" title="io_context::run_one (2 of 2 overloads)">more...</a></em></span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_for.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run_one/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,81 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run_one (1 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../run_one.html" title="io_context::run_one">
<link rel="prev" href="../run_one.html" title="io_context::run_one">
<link rel="next" href="overload2.html" title="io_context::run_one (2 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../run_one.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../run_one.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.run_one.overload1"></a><a class="link" href="overload1.html" title="io_context::run_one (1 of 2 overloads)">io_context::run_one
(1 of 2 overloads)</a>
</h5></div></div></div>
<p>
Run the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute at most one handler.
</p>
<pre class="programlisting">count_type run_one();
</pre>
<p>
The <code class="computeroutput">run_one()</code> function blocks until one handler has been
dispatched, or until the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped.
</p>
<h6>
<a name="boost_asio.reference.io_context.run_one.overload1.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_one.overload1.return_value"></a></span><a class="link" href="overload1.html#boost_asio.reference.io_context.run_one.overload1.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed. A zero return value implies
that the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object is stopped (the <code class="computeroutput">stopped()</code> function returns <code class="computeroutput">true</code>).
Subsequent calls to <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code>
or <code class="computeroutput">poll_one()</code> will return immediately unless there is a
prior call to <code class="computeroutput">restart()</code>.
</p>
<h6>
<a name="boost_asio.reference.io_context.run_one.overload1.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_one.overload1.remarks"></a></span><a class="link" href="overload1.html#boost_asio.reference.io_context.run_one.overload1.remarks">Remarks</a>
</h6>
<p>
Calling the <code class="computeroutput">run_one()</code> function from a thread that is currently
calling one of <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">run_for()</code>,
<code class="computeroutput">run_until()</code>, <code class="computeroutput">poll()</code> or <code class="computeroutput">poll_one()</code>
on the same <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object may introduce the potential for deadlock. It is the caller's reponsibility
to avoid this.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../run_one.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../run_one.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,85 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run_one (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../run_one.html" title="io_context::run_one">
<link rel="prev" href="overload1.html" title="io_context::run_one (1 of 2 overloads)">
<link rel="next" href="../run_one_for.html" title="io_context::run_one_for">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../run_one.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="../run_one_for.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.run_one.overload2"></a><a class="link" href="overload2.html" title="io_context::run_one (2 of 2 overloads)">io_context::run_one
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
(Deprecated: Use non-error_code overlaod.) Run the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop to execute at most one handler.
</p>
<pre class="programlisting">count_type run_one(
boost::system::error_code &amp; ec);
</pre>
<p>
The <code class="computeroutput">run_one()</code> function blocks until one handler has been
dispatched, or until the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped.
</p>
<h6>
<a name="boost_asio.reference.io_context.run_one.overload2.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_one.overload2.return_value"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.run_one.overload2.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed. A zero return value implies
that the <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object is stopped (the <code class="computeroutput">stopped()</code> function returns <code class="computeroutput">true</code>).
Subsequent calls to <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code>
or <code class="computeroutput">poll_one()</code> will return immediately unless there is a
prior call to <code class="computeroutput">restart()</code>.
</p>
<p>
The number of handlers that were executed.
</p>
<h6>
<a name="boost_asio.reference.io_context.run_one.overload2.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_one.overload2.remarks"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.run_one.overload2.remarks">Remarks</a>
</h6>
<p>
Calling the <code class="computeroutput">run_one()</code> function from a thread that is currently
calling one of <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">run_for()</code>,
<code class="computeroutput">run_until()</code>, <code class="computeroutput">poll()</code> or <code class="computeroutput">poll_one()</code>
on the same <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object may introduce the potential for deadlock. It is the caller's reponsibility
to avoid this.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../run_one.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="../run_one_for.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,83 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run_one_for</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="run_one/overload2.html" title="io_context::run_one (2 of 2 overloads)">
<link rel="next" href="run_one_until.html" title="io_context::run_one_until">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_one/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run_one_until.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.run_one_for"></a><a class="link" href="run_one_for.html" title="io_context::run_one_for">io_context::run_one_for</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.run_one_for"></a>
Run the
<a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop for a specified duration to execute at most
one handler.
</p>
<pre class="programlisting">template&lt;
typename Rep,
typename Period&gt;
std::size_t run_one_for(
const chrono::duration&lt; Rep, Period &gt; &amp; rel_time);
</pre>
<p>
The <code class="computeroutput">run_one_for()</code> function blocks until one handler has been
dispatched, until the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped, or until the specified duration has elapsed.
</p>
<h6>
<a name="boost_asio.reference.io_context.run_one_for.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_one_for.parameters"></a></span><a class="link" href="run_one_for.html#boost_asio.reference.io_context.run_one_for.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">rel_time</span></dt>
<dd><p>
The duration for which the call may block.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.run_one_for.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_one_for.return_value"></a></span><a class="link" href="run_one_for.html#boost_asio.reference.io_context.run_one_for.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_one/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run_one_until.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,83 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run_one_until</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="run_one_for.html" title="io_context::run_one_for">
<link rel="next" href="run_until.html" title="io_context::run_until">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_one_for.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run_until.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.run_one_until"></a><a class="link" href="run_one_until.html" title="io_context::run_one_until">io_context::run_one_until</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.run_one_until"></a>
Run
the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop until a specified time to execute at most
one handler.
</p>
<pre class="programlisting">template&lt;
typename Clock,
typename Duration&gt;
std::size_t run_one_until(
const chrono::time_point&lt; Clock, Duration &gt; &amp; abs_time);
</pre>
<p>
The <code class="computeroutput">run_one_until()</code> function blocks until one handler has
been dispatched, until the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped, or until the specified time has been reached.
</p>
<h6>
<a name="boost_asio.reference.io_context.run_one_until.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_one_until.parameters"></a></span><a class="link" href="run_one_until.html#boost_asio.reference.io_context.run_one_until.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">abs_time</span></dt>
<dd><p>
The time point until which the call may block.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.run_one_until.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_one_until.return_value"></a></span><a class="link" href="run_one_until.html#boost_asio.reference.io_context.run_one_until.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_one_for.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="run_until.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,81 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::run_until</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="run_one_until.html" title="io_context::run_one_until">
<link rel="next" href="shutdown.html" title="io_context::shutdown">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_one_until.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="shutdown.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.run_until"></a><a class="link" href="run_until.html" title="io_context::run_until">io_context::run_until</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.run_until"></a>
Run the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop until a specified time.
</p>
<pre class="programlisting">template&lt;
typename Clock,
typename Duration&gt;
std::size_t run_until(
const chrono::time_point&lt; Clock, Duration &gt; &amp; abs_time);
</pre>
<p>
The <code class="computeroutput">run_until()</code> function blocks until all work has finished
and there are no more handlers to be dispatched, until the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
has been stopped, or until the specified time has been reached.
</p>
<h6>
<a name="boost_asio.reference.io_context.run_until.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_until.parameters"></a></span><a class="link" href="run_until.html#boost_asio.reference.io_context.run_until.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">abs_time</span></dt>
<dd><p>
The time point until which the call may block.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.run_until.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.run_until.return_value"></a></span><a class="link" href="run_until.html#boost_asio.reference.io_context.run_until.return_value">Return
Value</a>
</h6>
<p>
The number of handlers that were executed.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_one_until.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="shutdown.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,62 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::shutdown</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="run_until.html" title="io_context::run_until">
<link rel="next" href="stop.html" title="io_context::stop">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_until.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="stop.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.shutdown"></a><a class="link" href="shutdown.html" title="io_context::shutdown">io_context::shutdown</a>
</h4></div></div></div>
<p>
<span class="emphasis"><em>Inherited from execution_context.</em></span>
</p>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.shutdown"></a>
Shuts down all
services in the context.
</p>
<pre class="programlisting">void shutdown();
</pre>
<p>
This function is implemented as follows:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
For each service object <code class="computeroutput">svc</code> in the <a class="link" href="../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
set, in reverse order of the beginning of service object lifetime,
performs <code class="computeroutput">svc-&gt;shutdown()</code>.
</li></ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="run_until.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="stop.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,58 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::stop</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="shutdown.html" title="io_context::shutdown">
<link rel="next" href="stopped.html" title="io_context::stopped">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="shutdown.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="stopped.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.stop"></a><a class="link" href="stop.html" title="io_context::stop">io_context::stop</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.stop"></a>
Stop the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's event processing loop.
</p>
<pre class="programlisting">void stop();
</pre>
<p>
This function does not block, but instead simply signals the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
to stop. All invocations of its <code class="computeroutput">run()</code> or <code class="computeroutput">run_one()</code>
member functions should return as soon as possible. Subsequent calls to
<code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>, <code class="computeroutput">poll()</code> or <code class="computeroutput">poll_one()</code>
will return immediately until <code class="computeroutput">restart()</code> is called.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="shutdown.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="stopped.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,68 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::stopped</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="stop.html" title="io_context::stop">
<link rel="next" href="use_service.html" title="io_context::use_service">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="stop.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="use_service.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.stopped"></a><a class="link" href="stopped.html" title="io_context::stopped">io_context::stopped</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.stopped"></a>
Determine whether
the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object has been stopped.
</p>
<pre class="programlisting">bool stopped() const;
</pre>
<p>
This function is used to determine whether an <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object has been stopped, either through an explicit call to <code class="computeroutput">stop()</code>,
or due to running out of work. When an <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object is stopped, calls to <code class="computeroutput">run()</code>, <code class="computeroutput">run_one()</code>,
<code class="computeroutput">poll()</code> or <code class="computeroutput">poll_one()</code> will return immediately
without invoking any handlers.
</p>
<h6>
<a name="boost_asio.reference.io_context.stopped.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.stopped.return_value"></a></span><a class="link" href="stopped.html#boost_asio.reference.io_context.stopped.return_value">Return Value</a>
</h6>
<p>
<code class="computeroutput">true</code> if the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object is stopped, otherwise <code class="computeroutput">false</code>.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="stop.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="use_service.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,62 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::use_service</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="stopped.html" title="io_context::stopped">
<link rel="next" href="use_service/overload1.html" title="io_context::use_service (1 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="stopped.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="use_service/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.use_service"></a><a class="link" href="use_service.html" title="io_context::use_service">io_context::use_service</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.use_service"></a>
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../Service.html" title="Service requirements">Service</a>&gt;
friend Service &amp; <a class="link" href="use_service/overload1.html" title="io_context::use_service (1 of 2 overloads)">use_service</a>(
io_context &amp; ioc);
<span class="emphasis"><em>» <a class="link" href="use_service/overload1.html" title="io_context::use_service (1 of 2 overloads)">more...</a></em></span>
</pre>
<p>
Obtain the service object corresponding to the given type.
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../Service.html" title="Service requirements">Service</a>&gt;
friend Service &amp; <a class="link" href="use_service/overload2.html" title="io_context::use_service (2 of 2 overloads)">use_service</a>(
execution_context &amp; e);
<span class="emphasis"><em>» <a class="link" href="use_service/overload2.html" title="io_context::use_service (2 of 2 overloads)">more...</a></em></span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="stopped.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="use_service/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::use_service (1 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../use_service.html" title="io_context::use_service">
<link rel="prev" href="../use_service.html" title="io_context::use_service">
<link rel="next" href="overload2.html" title="io_context::use_service (2 of 2 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../use_service.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../use_service.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.use_service.overload1"></a><a class="link" href="overload1.html" title="io_context::use_service (1 of 2 overloads)">io_context::use_service
(1 of 2 overloads)</a>
</h5></div></div></div>
<pre class="programlisting">template&lt;
typename <a class="link" href="../../Service.html" title="Service requirements">Service</a>&gt;
friend Service &amp; use_service(
io_context &amp; ioc);
</pre>
<h6>
<a name="boost_asio.reference.io_context.use_service.overload1.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.use_service.overload1.requirements"></a></span><a class="link" href="overload1.html#boost_asio.reference.io_context.use_service.overload1.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/io_context.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../use_service.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../use_service.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="overload2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,95 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::use_service (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../use_service.html" title="io_context::use_service">
<link rel="prev" href="overload1.html" title="io_context::use_service (1 of 2 overloads)">
<link rel="next" href="../wrap.html" title="io_context::wrap">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../use_service.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="../wrap.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.io_context.use_service.overload2"></a><a class="link" href="overload2.html" title="io_context::use_service (2 of 2 overloads)">io_context::use_service
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
<span class="emphasis"><em>Inherited from execution_context.</em></span>
</p>
<p>
Obtain the service object corresponding to the given type.
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../../Service.html" title="Service requirements">Service</a>&gt;
friend Service &amp; use_service(
execution_context &amp; e);
</pre>
<p>
This function is used to locate a service object that corresponds to
the given service type. If there is no existing implementation of the
service, then the <a class="link" href="../../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
will create a new instance of the service.
</p>
<h6>
<a name="boost_asio.reference.io_context.use_service.overload2.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.use_service.overload2.parameters"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.use_service.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">e</span></dt>
<dd><p>
The <a class="link" href="../../execution_context.html" title="execution_context"><code class="computeroutput">execution_context</code></a>
object that owns the service.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.use_service.overload2.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.use_service.overload2.return_value"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.use_service.overload2.return_value">Return
Value</a>
</h6>
<p>
The service interface implementing the specified service type. Ownership
of the service interface is not transferred to the caller.
</p>
<h6>
<a name="boost_asio.reference.io_context.use_service.overload2.h2"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.use_service.overload2.requirements"></a></span><a class="link" href="overload2.html#boost_asio.reference.io_context.use_service.overload2.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/io_context.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../use_service.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="../wrap.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,108 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::wrap</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../io_context.html" title="io_context">
<link rel="prev" href="use_service/overload2.html" title="io_context::use_service (2 of 2 overloads)">
<link rel="next" href="_io_context.html" title="io_context::~io_context">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="use_service/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="_io_context.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_asio.reference.io_context.wrap"></a><a class="link" href="wrap.html" title="io_context::wrap">io_context::wrap</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.io_context.wrap"></a>
(Deprecated: Use <a class="link" href="../bind_executor.html" title="bind_executor"><code class="computeroutput">bind_executor</code></a>.)
Create a new handler that automatically dispatches the wrapped handler
on the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
</p>
<pre class="programlisting">template&lt;
typename <a class="link" href="../Handler.html" title="Handlers">Handler</a>&gt;
unspecified wrap(
Handler handler);
</pre>
<p>
This function is used to create a new handler function object that, when
invoked, will automatically pass the wrapped handler to the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's dispatch function.
</p>
<h6>
<a name="boost_asio.reference.io_context.wrap.h0"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.wrap.parameters"></a></span><a class="link" href="wrap.html#boost_asio.reference.io_context.wrap.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">handler</span></dt>
<dd>
<p>
The handler to be wrapped. The <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
will make a copy of the handler object as required. The function
signature of the handler must be:
</p>
<pre class="programlisting">void handler(A1 a1, ... An an);
</pre>
<p>
</p>
</dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.io_context.wrap.h1"></a>
<span class="phrase"><a name="boost_asio.reference.io_context.wrap.return_value"></a></span><a class="link" href="wrap.html#boost_asio.reference.io_context.wrap.return_value">Return
Value</a>
</h6>
<p>
A function object that, when invoked, passes the wrapped handler to the
<a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object's dispatch function. Given a function object with the signature:
</p>
<pre class="programlisting">R f(A1 a1, ... An an);
</pre>
<p>
If this function object is passed to the wrap function like so:
</p>
<pre class="programlisting">io_context.wrap(f);
</pre>
<p>
then the return value is a function object with the signature
</p>
<pre class="programlisting">void g(A1 a1, ... An an);
</pre>
<p>
that, when invoked, executes code equivalent to:
</p>
<pre class="programlisting">io_context.dispatch(boost::bind(f, a1, ... an));
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="use_service/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_context.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="_io_context.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>