3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>basic_signal_set::rebind_executor::other</title>
5 <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
8 <link rel="up" href="../basic_signal_set__rebind_executor.html" title="basic_signal_set::rebind_executor">
9 <link rel="prev" href="../basic_signal_set__rebind_executor.html" title="basic_signal_set::rebind_executor">
10 <link rel="next" href="../basic_socket.html" title="basic_socket">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../basic_signal_set__rebind_executor.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_signal_set__rebind_executor.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="../basic_socket.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other"></a><a class="link" href="other.html" title="basic_signal_set::rebind_executor::other">basic_signal_set::rebind_executor::other</a>
28 </h4></div></div></div>
30 <a class="indexterm" name="boost_asio.indexterm.basic_signal_set__rebind_executor.other"></a>
32 signal set type when rebound to the specified executor.
34 <pre class="programlisting">typedef basic_signal_set< Executor1 > other;
37 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other.h0"></a>
38 <span class="phrase"><a name="boost_asio.reference.basic_signal_set__rebind_executor.other.types"></a></span><a class="link" href="other.html#boost_asio.reference.basic_signal_set__rebind_executor.other.types">Types</a>
40 <div class="informaltable"><table class="table">
61 <a class="link" href="../basic_signal_set__rebind_executor.html" title="basic_signal_set::rebind_executor"><span class="bold"><strong>rebind_executor</strong></span></a>
66 Rebinds the signal set type to another executor.
73 <a class="link" href="../basic_signal_set/executor_type.html" title="basic_signal_set::executor_type"><span class="bold"><strong>executor_type</strong></span></a>
78 The type of the executor associated with the object.
85 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other.h1"></a>
86 <span class="phrase"><a name="boost_asio.reference.basic_signal_set__rebind_executor.other.member_functions"></a></span><a class="link" href="other.html#boost_asio.reference.basic_signal_set__rebind_executor.other.member_functions">Member
89 <div class="informaltable"><table class="table">
110 <a class="link" href="../basic_signal_set/add.html" title="basic_signal_set::add"><span class="bold"><strong>add</strong></span></a>
115 Add a signal to a signal_set.
122 <a class="link" href="../basic_signal_set/async_wait.html" title="basic_signal_set::async_wait"><span class="bold"><strong>async_wait</strong></span></a>
127 Start an asynchronous operation to wait for a signal to be delivered.
134 <a class="link" href="../basic_signal_set/basic_signal_set.html" title="basic_signal_set::basic_signal_set"><span class="bold"><strong>basic_signal_set</strong></span></a>
139 Construct a signal set without adding any signals. <br> <span class="silver"> —</span><br>
140 Construct a signal set and add one signal. <br> <span class="silver"> —</span><br> Construct
141 a signal set and add two signals. <br> <span class="silver"> —</span><br> Construct a signal
142 set and add three signals.
149 <a class="link" href="../basic_signal_set/cancel.html" title="basic_signal_set::cancel"><span class="bold"><strong>cancel</strong></span></a>
154 Cancel all operations associated with the signal set.
161 <a class="link" href="../basic_signal_set/clear.html" title="basic_signal_set::clear"><span class="bold"><strong>clear</strong></span></a>
166 Remove all signals from a signal_set.
173 <a class="link" href="../basic_signal_set/get_executor.html" title="basic_signal_set::get_executor"><span class="bold"><strong>get_executor</strong></span></a>
178 Get the executor associated with the object.
185 <a class="link" href="../basic_signal_set/remove.html" title="basic_signal_set::remove"><span class="bold"><strong>remove</strong></span></a>
190 Remove a signal from a signal_set.
197 <a class="link" href="../basic_signal_set/_basic_signal_set.html" title="basic_signal_set::~basic_signal_set"><span class="bold"><strong>~basic_signal_set</strong></span></a>
202 Destroys the signal set.
209 The <a class="link" href="../basic_signal_set.html" title="basic_signal_set"><code class="computeroutput">basic_signal_set</code></a>
210 class provides the ability to perform an asynchronous wait for one or more
214 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other.h2"></a>
215 <span class="phrase"><a name="boost_asio.reference.basic_signal_set__rebind_executor.other.thread_safety"></a></span><a class="link" href="other.html#boost_asio.reference.basic_signal_set__rebind_executor.other.thread_safety">Thread
219 <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
222 <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe.
225 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other.h3"></a>
226 <span class="phrase"><a name="boost_asio.reference.basic_signal_set__rebind_executor.other.example"></a></span><a class="link" href="other.html#boost_asio.reference.basic_signal_set__rebind_executor.other.example">Example</a>
229 Performing an asynchronous wait:
231 <pre class="programlisting">void handler(
232 const boost::system::error_code& error,
237 // A signal occurred.
243 // Construct a signal set registered for process termination.
244 boost::asio::signal_set signals(my_context, SIGINT, SIGTERM);
246 // Start an asynchronous wait for one of the signals to occur.
247 signals.async_wait(handler);
250 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other.h4"></a>
251 <span class="phrase"><a name="boost_asio.reference.basic_signal_set__rebind_executor.other.queueing_of_signal_notifications"></a></span><a class="link" href="other.html#boost_asio.reference.basic_signal_set__rebind_executor.other.queueing_of_signal_notifications">Queueing
252 of signal notifications</a>
255 If a signal is registered with a signal_set, and the signal occurs when
256 there are no waiting handlers, then the signal notification is queued.
257 The next async_wait operation on that signal_set will dequeue the notification.
258 If multiple notifications are queued, subsequent async_wait operations
259 dequeue them one at a time. Signal notifications are dequeued in order
260 of ascending signal number.
263 If a signal number is removed from a signal_set (using the <code class="computeroutput">remove</code>
264 or <code class="computeroutput">erase</code> member functions) then any queued notifications for
265 that signal are discarded.
268 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other.h5"></a>
269 <span class="phrase"><a name="boost_asio.reference.basic_signal_set__rebind_executor.other.multiple_registration_of_signals"></a></span><a class="link" href="other.html#boost_asio.reference.basic_signal_set__rebind_executor.other.multiple_registration_of_signals">Multiple
270 registration of signals</a>
273 The same signal number may be registered with different signal_set objects.
274 When the signal occurs, one handler is called for each signal_set object.
277 Note that multiple registration only works for signals that are registered
278 using Asio. The application must not also register a signal handler using
279 functions such as <code class="computeroutput">signal()</code> or <code class="computeroutput">sigaction()</code>.
282 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other.h6"></a>
283 <span class="phrase"><a name="boost_asio.reference.basic_signal_set__rebind_executor.other.signal_masking_on_posix_platforms"></a></span><a class="link" href="other.html#boost_asio.reference.basic_signal_set__rebind_executor.other.signal_masking_on_posix_platforms">Signal
284 masking on POSIX platforms</a>
287 POSIX allows signals to be blocked using functions such as <code class="computeroutput">sigprocmask()</code>
288 and <code class="computeroutput">pthread_sigmask()</code>. For signals to be delivered, programs
289 must ensure that any signals registered using signal_set objects are unblocked
290 in at least one thread.
293 <a name="boost_asio.reference.basic_signal_set__rebind_executor.other.h7"></a>
294 <span class="phrase"><a name="boost_asio.reference.basic_signal_set__rebind_executor.other.requirements"></a></span><a class="link" href="other.html#boost_asio.reference.basic_signal_set__rebind_executor.other.requirements">Requirements</a>
297 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/basic_signal_set.hpp</code>
300 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
303 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
304 <td align="left"></td>
305 <td align="right"><div class="copyright-footer">Copyright © 2003-2019 Christopher M. Kohlhoff<p>
306 Distributed under the Boost Software License, Version 1.0. (See accompanying
307 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>)
312 <div class="spirit-nav">
313 <a accesskey="p" href="../basic_signal_set__rebind_executor.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_signal_set__rebind_executor.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="../basic_socket.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>