Adds asio library and Storage Module

This commit is contained in:
Suraxius committed 2020-12-01 22:41:04 +01:00
1 parent 79a6ee5779
commit 30439acd43
4869 files changed
+618801 -903

No files matched your search

@@ -0,0 +1,50 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::~strand</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="wrap.html" title="io_context::strand::wrap">
<link rel="next" href="../io_context__work.html" title="io_context::work">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="wrap.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="../io_context__work.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand._strand"></a><a class="link" href="_strand.html" title="io_context::strand::~strand">io_context::strand::~strand</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand._strand"></a>
Destructor.
</p>
<pre class="programlisting">~strand();
</pre>
<p>
Destroys a strand.
</p>
<p>
Handlers posted through the strand that have not yet been invoked will
still be dispatched in a way that meets the guarantee of non-concurrency.
</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-2020 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="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="../io_context__work.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,44 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::context</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="../io_context__strand.html" title="io_context::strand">
<link rel="next" href="defer.html" title="io_context::strand::defer">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../io_context__strand.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="defer.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.context"></a><a class="link" href="context.html" title="io_context::strand::context">io_context::strand::context</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.context"></a>
Obtain
the underlying execution context.
</p>
<pre class="programlisting">asio::io_context &amp; context() 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-2020 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__strand.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="defer.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,80 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::defer</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="context.html" title="io_context::strand::context">
<link rel="next" href="dispatch.html" title="io_context::strand::dispatch">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="context.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="dispatch.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.defer"></a><a class="link" href="defer.html" title="io_context::strand::defer">io_context::strand::defer</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.defer"></a>
Request the
strand to invoke the given function object.
</p>
<pre class="programlisting">template&lt;
typename Function,
typename Allocator&gt;
void defer(
Function &amp;&amp; f,
const Allocator &amp; a) const;
</pre>
<p>
This function is used to ask the executor to execute the given function
object. The function object will never be executed inside this function.
Instead, it will be scheduled to run by the underlying <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
</p>
<h6>
<a name="asio.reference.io_context__strand.defer.h0"></a>
<span><a name="asio.reference.io_context__strand.defer.parameters"></a></span><a class="link" href="defer.html#asio.reference.io_context__strand.defer.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">f</span></dt>
<dd>
<p>
The function object to be called. The executor will make a copy of
the handler object as required. The function signature of the function
object must be:
</p>
<pre class="programlisting">void function();
</pre>
<p>
</p>
</dd>
<dt><span class="term">a</span></dt>
<dd><p>
An allocator that may be used by the executor to allocate the internal
storage needed for function invocation.
</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-2020 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="context.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="dispatch.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::dispatch</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="defer.html" title="io_context::strand::defer">
<link rel="next" href="dispatch/overload1.html" title="io_context::strand::dispatch (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="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="defer.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="dispatch/overload1.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.dispatch"></a><a class="link" href="dispatch.html" title="io_context::strand::dispatch">io_context::strand::dispatch</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.dispatch"></a>
Request
the strand to invoke the given function object.
</p>
<pre class="programlisting">template&lt;
typename Function,
typename Allocator&gt;
void <a class="link" href="dispatch/overload1.html" title="io_context::strand::dispatch (1 of 2 overloads)">dispatch</a>(
Function &amp;&amp; f,
const Allocator &amp; a) const;
<span class="emphasis"><em>» <a class="link" href="dispatch/overload1.html" title="io_context::strand::dispatch (1 of 2 overloads)">more...</a></em></span>
</pre>
<p>
(Deprecated: Use <a class="link" href="../dispatch.html" title="dispatch"><code class="computeroutput">dispatch</code></a>.)
Request the strand 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#asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type"><span class="emphasis"><em>DEDUCED</em></span></a> <a class="link" href="dispatch/overload2.html" title="io_context::strand::dispatch (2 of 2 overloads)">dispatch</a>(
LegacyCompletionHandler &amp;&amp; handler);
<span class="emphasis"><em>» <a class="link" href="dispatch/overload2.html" title="io_context::strand::dispatch (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-2020 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="defer.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="dispatch/overload1.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,82 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::dispatch (1 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../../index.html" title="Asio">
<link rel="up" href="../dispatch.html" title="io_context::strand::dispatch">
<link rel="prev" href="../dispatch.html" title="io_context::strand::dispatch">
<link rel="next" href="overload2.html" title="io_context::strand::dispatch (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="asio C++ library" width="250" height="60" src="../../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../dispatch.html"><img src="../../../../prev.png" alt="Prev"></a><a accesskey="u" href="../dispatch.html"><img src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../home.png" alt="Home"></a><a accesskey="n" href="overload2.html"><img src="../../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="asio.reference.io_context__strand.dispatch.overload1"></a><a class="link" href="overload1.html" title="io_context::strand::dispatch (1 of 2 overloads)">io_context::strand::dispatch
(1 of 2 overloads)</a>
</h5></div></div></div>
<p>
Request the strand to invoke the given function object.
</p>
<pre class="programlisting">template&lt;
typename Function,
typename Allocator&gt;
void dispatch(
Function &amp;&amp; f,
const Allocator &amp; a) const;
</pre>
<p>
This function is used to ask the strand to execute the given function
object on its underlying <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
The function object will be executed inside this function if the strand
is not otherwise busy and if the underlying io_context's executor's
<code class="computeroutput">dispatch()</code> function is also able to execute the function
before returning.
</p>
<h6>
<a name="asio.reference.io_context__strand.dispatch.overload1.h0"></a>
<span><a name="asio.reference.io_context__strand.dispatch.overload1.parameters"></a></span><a class="link" href="overload1.html#asio.reference.io_context__strand.dispatch.overload1.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">f</span></dt>
<dd>
<p>
The function object to be called. The executor will make a copy
of the handler object as required. The function signature of the
function object must be:
</p>
<pre class="programlisting">void function();
</pre>
<p>
</p>
</dd>
<dt><span class="term">a</span></dt>
<dd><p>
An allocator that may be used by the executor to allocate the internal
storage needed for function invocation.
</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-2020 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="../../../../prev.png" alt="Prev"></a><a accesskey="u" href="../dispatch.html"><img src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../home.png" alt="Home"></a><a accesskey="n" href="overload2.html"><img src="../../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,85 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::dispatch (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../../index.html" title="Asio">
<link rel="up" href="../dispatch.html" title="io_context::strand::dispatch">
<link rel="prev" href="overload1.html" title="io_context::strand::dispatch (1 of 2 overloads)">
<link rel="next" href="../on_work_finished.html" title="io_context::strand::on_work_finished">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../prev.png" alt="Prev"></a><a accesskey="u" href="../dispatch.html"><img src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../home.png" alt="Home"></a><a accesskey="n" href="../on_work_finished.html"><img src="../../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="asio.reference.io_context__strand.dispatch.overload2"></a><a class="link" href="overload2.html" title="io_context::strand::dispatch (2 of 2 overloads)">io_context::strand::dispatch
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
(Deprecated: Use <a class="link" href="../../dispatch.html" title="dispatch"><code class="computeroutput">dispatch</code></a>.)
Request the strand 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#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 strand to execute the given handler.
</p>
<p>
The strand object guarantees that handlers posted or dispatched through
the strand will not be executed concurrently. The handler may be executed
inside this function if the guarantee can be met. If this function is
called from within a handler that was posted or dispatched through the
same strand, then the new handler will be executed immediately.
</p>
<p>
The strand's guarantee is in addition to the guarantee provided by the
underlying <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
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 io_context's run member function is currently being invoked.
</p>
<h6>
<a name="asio.reference.io_context__strand.dispatch.overload2.h0"></a>
<span><a name="asio.reference.io_context__strand.dispatch.overload2.parameters"></a></span><a class="link" href="overload2.html#asio.reference.io_context__strand.dispatch.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">handler</span></dt>
<dd>
<p>
The handler to be called. The strand 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>
</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-2020 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="../../../../prev.png" alt="Prev"></a><a accesskey="u" href="../dispatch.html"><img src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../home.png" alt="Home"></a><a accesskey="n" href="../on_work_finished.html"><img src="../../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,47 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::on_work_finished</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="dispatch/overload2.html" title="io_context::strand::dispatch (2 of 2 overloads)">
<link rel="next" href="on_work_started.html" title="io_context::strand::on_work_started">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="dispatch/overload2.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="on_work_started.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.on_work_finished"></a><a class="link" href="on_work_finished.html" title="io_context::strand::on_work_finished">io_context::strand::on_work_finished</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.on_work_finished"></a>
Inform
the strand that some work is no longer outstanding.
</p>
<pre class="programlisting">void on_work_finished() const;
</pre>
<p>
The strand delegates this call to its underlying <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
</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-2020 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/overload2.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="on_work_started.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,47 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::on_work_started</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="on_work_finished.html" title="io_context::strand::on_work_finished">
<link rel="next" href="operator_not__eq_.html" title="io_context::strand::operator!=">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="on_work_finished.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="operator_not__eq_.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.on_work_started"></a><a class="link" href="on_work_started.html" title="io_context::strand::on_work_started">io_context::strand::on_work_started</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.on_work_started"></a>
Inform
the strand that it has some outstanding work to do.
</p>
<pre class="programlisting">void on_work_started() const;
</pre>
<p>
The strand delegates this call to its underlying <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
</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-2020 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="on_work_finished.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="operator_not__eq_.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::operator==</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="operator_not__eq_.html" title="io_context::strand::operator!=">
<link rel="next" href="post.html" title="io_context::strand::post">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="operator_not__eq_.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="post.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.operator_eq__eq_"></a><a class="link" href="operator_eq__eq_.html" title="io_context::strand::operator==">io_context::strand::operator==</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.operator_eq__eq_"></a>
Compare
two strands for equality.
</p>
<pre class="programlisting">friend bool operator==(
const strand &amp; a,
const strand &amp; b);
</pre>
<p>
Two strands are equal if they refer to the same ordered, non-concurrent
state.
</p>
<h6>
<a name="asio.reference.io_context__strand.operator_eq__eq_.h0"></a>
<span><a name="asio.reference.io_context__strand.operator_eq__eq_.requirements"></a></span><a class="link" href="operator_eq__eq_.html#asio.reference.io_context__strand.operator_eq__eq_.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">asio/io_context_strand.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">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-2020 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="operator_not__eq_.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="post.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::operator!=</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="on_work_started.html" title="io_context::strand::on_work_started">
<link rel="next" href="operator_eq__eq_.html" title="io_context::strand::operator==">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="on_work_started.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="operator_eq__eq_.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.operator_not__eq_"></a><a class="link" href="operator_not__eq_.html" title="io_context::strand::operator!=">io_context::strand::operator!=</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.operator_not__eq_"></a>
Compare
two strands for inequality.
</p>
<pre class="programlisting">friend bool operator!=(
const strand &amp; a,
const strand &amp; b);
</pre>
<p>
Two strands are equal if they refer to the same ordered, non-concurrent
state.
</p>
<h6>
<a name="asio.reference.io_context__strand.operator_not__eq_.h0"></a>
<span><a name="asio.reference.io_context__strand.operator_not__eq_.requirements"></a></span><a class="link" href="operator_not__eq_.html#asio.reference.io_context__strand.operator_not__eq_.requirements">Requirements</a>
</h6>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">asio/io_context_strand.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">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-2020 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="on_work_started.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="operator_eq__eq_.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::post</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="operator_eq__eq_.html" title="io_context::strand::operator==">
<link rel="next" href="post/overload1.html" title="io_context::strand::post (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="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="operator_eq__eq_.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="post/overload1.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.post"></a><a class="link" href="post.html" title="io_context::strand::post">io_context::strand::post</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.post"></a>
Request the
strand to invoke the given function object.
</p>
<pre class="programlisting">template&lt;
typename Function,
typename Allocator&gt;
void <a class="link" href="post/overload1.html" title="io_context::strand::post (1 of 2 overloads)">post</a>(
Function &amp;&amp; f,
const Allocator &amp; a) const;
<span class="emphasis"><em>» <a class="link" href="post/overload1.html" title="io_context::strand::post (1 of 2 overloads)">more...</a></em></span>
</pre>
<p>
(Deprecated: Use <a class="link" href="../post.html" title="post"><code class="computeroutput">post</code></a>.)
Request the strand 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#asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type"><span class="emphasis"><em>DEDUCED</em></span></a> <a class="link" href="post/overload2.html" title="io_context::strand::post (2 of 2 overloads)">post</a>(
LegacyCompletionHandler &amp;&amp; handler);
<span class="emphasis"><em>» <a class="link" href="post/overload2.html" title="io_context::strand::post (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-2020 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="operator_eq__eq_.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="post/overload1.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,79 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::post (1 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../../index.html" title="Asio">
<link rel="up" href="../post.html" title="io_context::strand::post">
<link rel="prev" href="../post.html" title="io_context::strand::post">
<link rel="next" href="overload2.html" title="io_context::strand::post (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="asio C++ library" width="250" height="60" src="../../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../post.html"><img src="../../../../prev.png" alt="Prev"></a><a accesskey="u" href="../post.html"><img src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../home.png" alt="Home"></a><a accesskey="n" href="overload2.html"><img src="../../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="asio.reference.io_context__strand.post.overload1"></a><a class="link" href="overload1.html" title="io_context::strand::post (1 of 2 overloads)">io_context::strand::post
(1 of 2 overloads)</a>
</h5></div></div></div>
<p>
Request the strand to invoke the given function object.
</p>
<pre class="programlisting">template&lt;
typename Function,
typename Allocator&gt;
void post(
Function &amp;&amp; f,
const Allocator &amp; a) const;
</pre>
<p>
This function is used to ask the executor to execute the given function
object. The function object will never be executed inside this function.
Instead, it will be scheduled to run by the underlying <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
</p>
<h6>
<a name="asio.reference.io_context__strand.post.overload1.h0"></a>
<span><a name="asio.reference.io_context__strand.post.overload1.parameters"></a></span><a class="link" href="overload1.html#asio.reference.io_context__strand.post.overload1.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">f</span></dt>
<dd>
<p>
The function object to be called. The executor will make a copy
of the handler object as required. The function signature of the
function object must be:
</p>
<pre class="programlisting">void function();
</pre>
<p>
</p>
</dd>
<dt><span class="term">a</span></dt>
<dd><p>
An allocator that may be used by the executor to allocate the internal
storage needed for function invocation.
</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-2020 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="../../../../prev.png" alt="Prev"></a><a accesskey="u" href="../post.html"><img src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../home.png" alt="Home"></a><a accesskey="n" href="overload2.html"><img src="../../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,81 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::post (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../../index.html" title="Asio">
<link rel="up" href="../post.html" title="io_context::strand::post">
<link rel="prev" href="overload1.html" title="io_context::strand::post (1 of 2 overloads)">
<link rel="next" href="../running_in_this_thread.html" title="io_context::strand::running_in_this_thread">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../prev.png" alt="Prev"></a><a accesskey="u" href="../post.html"><img src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../home.png" alt="Home"></a><a accesskey="n" href="../running_in_this_thread.html"><img src="../../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="asio.reference.io_context__strand.post.overload2"></a><a class="link" href="overload2.html" title="io_context::strand::post (2 of 2 overloads)">io_context::strand::post
(2 of 2 overloads)</a>
</h5></div></div></div>
<p>
(Deprecated: Use <a class="link" href="../../post.html" title="post"><code class="computeroutput">post</code></a>.)
Request the strand 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#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 strand to execute the given handler,
but without allowing the strand to call the handler from inside this
function.
</p>
<p>
The strand object guarantees that handlers posted or dispatched through
the strand will not be executed concurrently. The strand's guarantee
is in addition to the guarantee provided by the underlying <a class="link" href="../../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>.
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 io_context's run member function is currently being invoked.
</p>
<h6>
<a name="asio.reference.io_context__strand.post.overload2.h0"></a>
<span><a name="asio.reference.io_context__strand.post.overload2.parameters"></a></span><a class="link" href="overload2.html#asio.reference.io_context__strand.post.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">handler</span></dt>
<dd>
<p>
The handler to be called. The strand 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>
</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-2020 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="../../../../prev.png" alt="Prev"></a><a accesskey="u" href="../post.html"><img src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../home.png" alt="Home"></a><a accesskey="n" href="../running_in_this_thread.html"><img src="../../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,54 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::running_in_this_thread</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="post/overload2.html" title="io_context::strand::post (2 of 2 overloads)">
<link rel="next" href="strand.html" title="io_context::strand::strand">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="post/overload2.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="strand.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.running_in_this_thread"></a><a class="link" href="running_in_this_thread.html" title="io_context::strand::running_in_this_thread">io_context::strand::running_in_this_thread</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.running_in_this_thread"></a>
Determine
whether the strand is running in the current thread.
</p>
<pre class="programlisting">bool running_in_this_thread() const;
</pre>
<h6>
<a name="asio.reference.io_context__strand.running_in_this_thread.h0"></a>
<span><a name="asio.reference.io_context__strand.running_in_this_thread.return_value"></a></span><a class="link" href="running_in_this_thread.html#asio.reference.io_context__strand.running_in_this_thread.return_value">Return
Value</a>
</h6>
<p>
<code class="computeroutput">true</code> if the current thread is executing a handler that was
submitted to the strand using <code class="computeroutput">post()</code>, <code class="computeroutput">dispatch()</code>
or <code class="computeroutput">wrap()</code>. Otherwise returns <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-2020 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/overload2.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="strand.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,62 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::strand</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="running_in_this_thread.html" title="io_context::strand::running_in_this_thread">
<link rel="next" href="wrap.html" title="io_context::strand::wrap">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="running_in_this_thread.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="wrap.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.strand"></a><a class="link" href="strand.html" title="io_context::strand::strand">io_context::strand::strand</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.strand"></a>
Constructor.
</p>
<pre class="programlisting">strand(
asio::io_context &amp; io_context);
</pre>
<p>
Constructs the strand.
</p>
<h6>
<a name="asio.reference.io_context__strand.strand.h0"></a>
<span><a name="asio.reference.io_context__strand.strand.parameters"></a></span><a class="link" href="strand.html#asio.reference.io_context__strand.strand.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">io_context</span></dt>
<dd><p>
The <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a>
object that the strand will use to dispatch handlers that are ready
to be run.
</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-2020 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="running_in_this_thread.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="wrap.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
@@ -0,0 +1,99 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>io_context::strand::wrap</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../io_context__strand.html" title="io_context::strand">
<link rel="prev" href="strand.html" title="io_context::strand::strand">
<link rel="next" href="_strand.html" title="io_context::strand::~strand">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="strand.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="_strand.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.io_context__strand.wrap"></a><a class="link" href="wrap.html" title="io_context::strand::wrap">io_context::strand::wrap</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.io_context__strand.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 strand.
</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 strand's dispatch
function.
</p>
<h6>
<a name="asio.reference.io_context__strand.wrap.h0"></a>
<span><a name="asio.reference.io_context__strand.wrap.parameters"></a></span><a class="link" href="wrap.html#asio.reference.io_context__strand.wrap.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">handler</span></dt>
<dd>
<p>
The handler to be wrapped. The strand 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="asio.reference.io_context__strand.wrap.h1"></a>
<span><a name="asio.reference.io_context__strand.wrap.return_value"></a></span><a class="link" href="wrap.html#asio.reference.io_context__strand.wrap.return_value">Return Value</a>
</h6>
<p>
A function object that, when invoked, passes the wrapped handler to the
strand'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">strand.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">strand.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-2020 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="strand.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../io_context__strand.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="_strand.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>