1212#include " socket.hpp"
1313#include " detail/actor_service.hpp"
1414
15- #include < boost/asio/io_service .hpp>
15+ #include < boost/asio/io_context .hpp>
1616
1717#include < functional>
1818
@@ -25,7 +25,7 @@ AZMQ_V1_INLINE_NAMESPACE_BEGIN
2525 using last_error = detail::actor_service::last_error;
2626
2727 /* * \brief create an actor bound to one end of a pipe (pair of inproc sockets)
28- * \param peer io_service to associate the peer (caller) end of the pipe
28+ * \param peer io_context to associate the peer (caller) end of the pipe
2929 * \param f Function accepting socket& as the first parameter and a
3030 * number of additional args
3131 * \returns peer socket
@@ -35,15 +35,15 @@ AZMQ_V1_INLINE_NAMESPACE_BEGIN
3535 * will be attached to the lifetime of the returned socket and will run
3636 * until it is destroyed.
3737 *
38- * \remark Each actor has an associated io_service and the supplied socket
39- * will be created on this io_service . The actor may access this by calling
40- * get_io_service () on the supplied socket.
38+ * \remark Each actor has an associated io_context and the supplied socket
39+ * will be created on this io_context . The actor may access this by calling
40+ * get_io_context () on the supplied socket.
4141 *
42- * \remark The associated io_service is configured to stop the spawned actor
42+ * \remark The associated io_context is configured to stop the spawned actor
4343 * on SIG_KILL and SIG_TERM.
4444 *
4545 * \remark Termination:
46- * well behaved actors should ultimately call run() on the io_service
46+ * well behaved actors should ultimately call run() on the io_context
4747 * associated with the supplied socket. This allows the 'client' end of
4848 * the socket's lifetime to cleanly signal termination. If for some
4949 * reason, this is not possible, the caller should set the 'detached'
@@ -54,20 +54,20 @@ AZMQ_V1_INLINE_NAMESPACE_BEGIN
5454 * message.
5555 *
5656 * Also note, the default signal handling for the background thread is
57- * designed to call stop() on the associated io_service , so not calling
57+ * designed to call stop() on the associated io_context , so not calling
5858 * run() in your handler means you are responsible for catching these
5959 * signals in some other way.
6060 */
6161 template <typename Function, typename ... Args>
62- socket spawn (boost::asio::io_service & peer, bool defer_start, Function && f, Args&&... args) {
62+ socket spawn (boost::asio::io_context & peer, bool defer_start, Function && f, Args&&... args) {
6363 auto & t = boost::asio::use_service<detail::actor_service>(peer);
6464 return t.make_pipe (defer_start, std::bind (std::forward<Function>(f),
6565 std::placeholders::_1,
6666 std::forward<Args>(args)...));
6767 }
6868
6969 template <typename Function, typename ... Args>
70- socket spawn (boost::asio::io_service & peer, Function && f, Args&&... args) {
70+ socket spawn (boost::asio::io_context & peer, Function && f, Args&&... args) {
7171 auto & t = boost::asio::use_service<detail::actor_service>(peer);
7272 return t.make_pipe (false , std::bind (std::forward<Function>(f),
7373 std::placeholders::_1,
@@ -78,4 +78,3 @@ AZMQ_V1_INLINE_NAMESPACE_END
7878} // namespace actor
7979} // namespace azmq
8080#endif // AZMQ_ACTOR_HPP_
81-
0 commit comments