[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,51 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>system_context::~system_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="../system_context.html" title="system_context">
<link rel="prev" href="use_service/overload2.html" title="system_context::use_service (2 of 2 overloads)">
<link rel="next" href="../system_executor.html" title="system_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="use_service/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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="../system_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.system_context._system_context"></a><a class="link" href="_system_context.html" title="system_context::~system_context">system_context::~system_context</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.system_context._system_context"></a>
Destructor
shuts down all threads in the system thread pool.
</p>
<pre class="programlisting">~system_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="use_service/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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="../system_executor.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>system_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="../system_context.html" title="system_context">
<link rel="prev" href="../system_context.html" title="system_context">
<link rel="next" href="destroy.html" title="system_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="../system_context.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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.system_context.add_service"></a><a class="link" href="add_service.html" title="system_context::add_service">system_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.system_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.system_context.add_service.h0"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.add_service.parameters"></a></span><a class="link" href="add_service.html#boost_asio.reference.system_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.system_context.add_service.h1"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.add_service.exceptions"></a></span><a class="link" href="add_service.html#boost_asio.reference.system_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.system_context.add_service.h2"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.add_service.requirements"></a></span><a class="link" href="add_service.html#boost_asio.reference.system_context.add_service.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/system_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="../system_context.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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>system_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="../system_context.html" title="system_context">
<link rel="prev" href="add_service.html" title="system_context::add_service">
<link rel="next" href="executor_type.html" title="system_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="add_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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.system_context.destroy"></a><a class="link" href="destroy.html" title="system_context::destroy">system_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.system_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="add_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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,285 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>system_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="../system_context.html" title="system_context">
<link rel="prev" href="destroy.html" title="system_context::destroy">
<link rel="next" href="fork_event.html" title="system_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="destroy.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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.system_context.executor_type"></a><a class="link" href="executor_type.html" title="system_context::executor_type">system_context::executor_type</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.system_context.executor_type"></a>
The
executor type associated with the context.
</p>
<pre class="programlisting">typedef basic_system_executor&lt; execution::blocking_t::possibly_t, execution::relationship_t::fork_t, std::allocator&lt; void &gt; &gt; executor_type;
</pre>
<h6>
<a name="boost_asio.reference.system_context.executor_type.h0"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.executor_type.member_functions"></a></span><a class="link" href="executor_type.html#boost_asio.reference.system_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="../basic_system_executor/basic_system_executor.html" title="basic_system_executor::basic_system_executor"><span class="bold"><strong>basic_system_executor</strong></span></a> <span class="silver">[constructor]</span>
</p>
</td>
<td>
<p>
Default constructor.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../basic_system_executor/context.html" title="basic_system_executor::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="../basic_system_executor/defer.html" title="basic_system_executor::defer"><span class="bold"><strong>defer</strong></span></a>
</p>
</td>
<td>
<p>
Request the system executor to invoke the given function object.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../basic_system_executor/dispatch.html" title="basic_system_executor::dispatch"><span class="bold"><strong>dispatch</strong></span></a>
</p>
</td>
<td>
<p>
Request the system executor to invoke the given function object.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../basic_system_executor/execute.html" title="basic_system_executor::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="../basic_system_executor/on_work_finished.html" title="basic_system_executor::on_work_finished"><span class="bold"><strong>on_work_finished</strong></span></a>
</p>
</td>
<td>
<p>
Inform the executor that some work is no longer outstanding.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../basic_system_executor/on_work_started.html" title="basic_system_executor::on_work_started"><span class="bold"><strong>on_work_started</strong></span></a>
</p>
</td>
<td>
<p>
Inform the executor that it has some outstanding work to do.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../basic_system_executor/post.html" title="basic_system_executor::post"><span class="bold"><strong>post</strong></span></a>
</p>
</td>
<td>
<p>
Request the system executor to invoke the given function object.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../basic_system_executor/query.html" title="basic_system_executor::query"><span class="bold"><strong>query</strong></span></a>
</p>
</td>
<td>
<p>
Query the current value of the allocator property. <br> <span class="silver"></span><br>
Query the occupancy (recommended number of work items) for the
system context.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../basic_system_executor/query__static.html" title="basic_system_executor::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 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.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="../basic_system_executor/require.html" title="basic_system_executor::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.always 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.continuation
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 specified
allocator property. <br> <span class="silver"></span><br> Obtain an executor with the
default allocator property.
</p>
</td>
</tr>
</tbody>
</table></div>
<h6>
<a name="boost_asio.reference.system_context.executor_type.h1"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.executor_type.friends"></a></span><a class="link" href="executor_type.html#boost_asio.reference.system_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="../basic_system_executor/operator_not__eq_.html" title="basic_system_executor::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="../basic_system_executor/operator_eq__eq_.html" title="basic_system_executor::operator=="><span class="bold"><strong>operator==</strong></span></a>
</p>
</td>
<td>
<p>
Compare two executors for equality.
</p>
</td>
</tr>
</tbody>
</table></div>
<p>
The system executor represents an execution context where functions are
permitted to run on arbitrary threads. When the blocking.never property
is established, the system executor will schedule the function to run on
an unspecified system thread pool. When either blocking.possibly or blocking.always
is established, the executor invokes the function immediately.
</p>
<h6>
<a name="boost_asio.reference.system_context.executor_type.h2"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.executor_type.requirements"></a></span><a class="link" href="executor_type.html#boost_asio.reference.system_context.executor_type.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/system_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="destroy.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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>system_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="../system_context.html" title="system_context">
<link rel="prev" href="executor_type.html" title="system_context::executor_type">
<link rel="next" href="get_executor.html" title="system_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="../system_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.system_context.fork_event"></a><a class="link" href="fork_event.html" title="system_context::fork_event">system_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.system_context.fork_event"></a>
Fork-related
event notifications.
</p>
<pre class="programlisting">enum fork_event
</pre>
<p>
<a class="indexterm" name="boost_asio.indexterm.system_context.fork_event.fork_prepare"></a>
<a class="indexterm" name="boost_asio.indexterm.system_context.fork_event.fork_parent"></a>
<a class="indexterm" name="boost_asio.indexterm.system_context.fork_event.fork_child"></a>
</p>
<h6>
<a name="boost_asio.reference.system_context.fork_event.h0"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.fork_event.values"></a></span><a class="link" href="fork_event.html#boost_asio.reference.system_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="../system_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>system_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="../system_context.html" title="system_context">
<link rel="prev" href="fork_event.html" title="system_context::fork_event">
<link rel="next" href="has_service.html" title="system_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="../system_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.system_context.get_executor"></a><a class="link" href="get_executor.html" title="system_context::get_executor">system_context::get_executor</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.system_context.get_executor"></a>
Obtain
an executor for the context.
</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="../system_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>system_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="../system_context.html" title="system_context">
<link rel="prev" href="get_executor.html" title="system_context::get_executor">
<link rel="next" href="join.html" title="system_context::join">
</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="../system_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="join.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.system_context.has_service"></a><a class="link" href="has_service.html" title="system_context::has_service">system_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.system_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.system_context.has_service.h0"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.has_service.parameters"></a></span><a class="link" href="has_service.html#boost_asio.reference.system_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.system_context.has_service.h1"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.has_service.return_value"></a></span><a class="link" href="has_service.html#boost_asio.reference.system_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.system_context.has_service.h2"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.has_service.requirements"></a></span><a class="link" href="has_service.html#boost_asio.reference.system_context.has_service.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/system_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="../system_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="join.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>system_context::join</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="../system_context.html" title="system_context">
<link rel="prev" href="has_service.html" title="system_context::has_service">
<link rel="next" href="make_service.html" title="system_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="has_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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><h4 class="title">
<a name="boost_asio.reference.system_context.join"></a><a class="link" href="join.html" title="system_context::join">system_context::join</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.system_context.join"></a>
Join all threads
in the system thread pool.
</p>
<pre class="programlisting">void join();
</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="../system_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>system_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="../system_context.html" title="system_context">
<link rel="prev" href="join.html" title="system_context::join">
<link rel="next" href="notify_fork.html" title="system_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="join.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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.system_context.make_service"></a><a class="link" href="make_service.html" title="system_context::make_service">system_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.system_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.system_context.make_service.h0"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.make_service.parameters"></a></span><a class="link" href="make_service.html#boost_asio.reference.system_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.system_context.make_service.h1"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.make_service.exceptions"></a></span><a class="link" href="make_service.html#boost_asio.reference.system_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.system_context.make_service.h2"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.make_service.requirements"></a></span><a class="link" href="make_service.html#boost_asio.reference.system_context.make_service.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/system_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="join.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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>system_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="../system_context.html" title="system_context">
<link rel="prev" href="make_service.html" title="system_context::make_service">
<link rel="next" href="shutdown.html" title="system_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="make_service.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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.system_context.notify_fork"></a><a class="link" href="notify_fork.html" title="system_context::notify_fork">system_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.system_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.system_context.notify_fork.h0"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.notify_fork.parameters"></a></span><a class="link" href="notify_fork.html#boost_asio.reference.system_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.system_context.notify_fork.h1"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.notify_fork.exceptions"></a></span><a class="link" href="notify_fork.html#boost_asio.reference.system_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.system_context.notify_fork.h2"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.notify_fork.example"></a></span><a class="link" href="notify_fork.html#boost_asio.reference.system_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.system_context.notify_fork.h3"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.notify_fork.remarks"></a></span><a class="link" href="notify_fork.html#boost_asio.reference.system_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="../system_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>system_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="../system_context.html" title="system_context">
<link rel="prev" href="notify_fork.html" title="system_context::notify_fork">
<link rel="next" href="stop.html" title="system_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="notify_fork.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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.system_context.shutdown"></a><a class="link" href="shutdown.html" title="system_context::shutdown">system_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.system_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="notify_fork.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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,51 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>system_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="../system_context.html" title="system_context">
<link rel="prev" href="shutdown.html" title="system_context::shutdown">
<link rel="next" href="stopped.html" title="system_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="../system_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.system_context.stop"></a><a class="link" href="stop.html" title="system_context::stop">system_context::stop</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.system_context.stop"></a>
Signal all threads
in the system thread pool to stop.
</p>
<pre class="programlisting">void stop();
</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="shutdown.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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,51 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>system_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="../system_context.html" title="system_context">
<link rel="prev" href="stop.html" title="system_context::stop">
<link rel="next" href="use_service.html" title="system_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="../system_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.system_context.stopped"></a><a class="link" href="stopped.html" title="system_context::stopped">system_context::stopped</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.system_context.stopped"></a>
Determine
whether the system thread pool has been stopped.
</p>
<pre class="programlisting">bool stopped() const;
</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="stop.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../system_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,61 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>system_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="../system_context.html" title="system_context">
<link rel="prev" href="stopped.html" title="system_context::stopped">
<link rel="next" href="use_service/overload1.html" title="system_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="../system_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.system_context.use_service"></a><a class="link" href="use_service.html" title="system_context::use_service">system_context::use_service</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="boost_asio.indexterm.system_context.use_service"></a>
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/overload1.html" title="system_context::use_service (1 of 2 overloads)">use_service</a>(
execution_context &amp; e);
<span class="emphasis"><em>» <a class="link" href="use_service/overload1.html" title="system_context::use_service (1 of 2 overloads)">more...</a></em></span>
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="system_context::use_service (2 of 2 overloads)">use_service</a>(
io_context &amp; ioc);
<span class="emphasis"><em>» <a class="link" href="use_service/overload2.html" title="system_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="../system_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,95 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>system_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="system_context::use_service">
<link rel="prev" href="../use_service.html" title="system_context::use_service">
<link rel="next" href="overload2.html" title="system_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.system_context.use_service.overload1"></a><a class="link" href="overload1.html" title="system_context::use_service (1 of 2 overloads)">system_context::use_service
(1 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.system_context.use_service.overload1.h0"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.use_service.overload1.parameters"></a></span><a class="link" href="overload1.html#boost_asio.reference.system_context.use_service.overload1.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.system_context.use_service.overload1.h1"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.use_service.overload1.return_value"></a></span><a class="link" href="overload1.html#boost_asio.reference.system_context.use_service.overload1.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.system_context.use_service.overload1.h2"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.use_service.overload1.requirements"></a></span><a class="link" href="overload1.html#boost_asio.reference.system_context.use_service.overload1.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/system_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,103 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>system_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="system_context::use_service">
<link rel="prev" href="overload1.html" title="system_context::use_service (1 of 2 overloads)">
<link rel="next" href="../_system_context.html" title="system_context::~system_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="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="../_system_context.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.system_context.use_service.overload2"></a><a class="link" href="overload2.html" title="system_context::use_service (2 of 2 overloads)">system_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(
io_context &amp; ioc);
</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="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
will create a new instance of the service.
</p>
<h6>
<a name="boost_asio.reference.system_context.use_service.overload2.h0"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.use_service.overload2.parameters"></a></span><a class="link" href="overload2.html#boost_asio.reference.system_context.use_service.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl class="variablelist">
<dt><span class="term">ioc</span></dt>
<dd><p>
The <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object that owns the service.
</p></dd>
</dl>
</div>
<h6>
<a name="boost_asio.reference.system_context.use_service.overload2.h1"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.use_service.overload2.return_value"></a></span><a class="link" href="overload2.html#boost_asio.reference.system_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.system_context.use_service.overload2.h2"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.use_service.overload2.remarks"></a></span><a class="link" href="overload2.html#boost_asio.reference.system_context.use_service.overload2.remarks">Remarks</a>
</h6>
<p>
This overload is preserved for backwards compatibility with services
that inherit from <a class="link" href="../../io_context__service.html" title="io_context::service"><code class="computeroutput">io_context::service</code></a>.
</p>
<h6>
<a name="boost_asio.reference.system_context.use_service.overload2.h3"></a>
<span class="phrase"><a name="boost_asio.reference.system_context.use_service.overload2.requirements"></a></span><a class="link" href="overload2.html#boost_asio.reference.system_context.use_service.overload2.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/system_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="../_system_context.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>