diff options
Diffstat (limited to 'boost/process/detail/posix/async_pipe.hpp')
-rw-r--r-- | boost/process/detail/posix/async_pipe.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/boost/process/detail/posix/async_pipe.hpp b/boost/process/detail/posix/async_pipe.hpp index 2b82c632e1..725a078900 100644 --- a/boost/process/detail/posix/async_pipe.hpp +++ b/boost/process/detail/posix/async_pipe.hpp @@ -9,6 +9,7 @@ #include <boost/process/detail/posix/basic_pipe.hpp> #include <boost/asio/posix/stream_descriptor.hpp> +#include <boost/asio/post.hpp> #include <system_error> #include <string> #include <utility> @@ -109,9 +110,9 @@ public: void async_close() { if (_sink.is_open()) - _sink.get_io_context(). post([this]{_sink.close();}); + boost::asio::post(_sink.get_executor(), [this]{_sink.close();}); if (_source.is_open()) - _source.get_io_context().post([this]{_source.close();}); + boost::asio::post(_source.get_executor(), [this]{_source.close();}); } template<typename MutableBufferSequence> @@ -218,8 +219,8 @@ async_pipe::async_pipe(boost::asio::io_context & ios_source, } async_pipe::async_pipe(const async_pipe & p) : - _source(const_cast<async_pipe&>(p)._source.get_io_context()), - _sink( const_cast<async_pipe&>(p)._sink.get_io_context()) + _source(const_cast<async_pipe&>(p)._source.get_executor()), + _sink( const_cast<async_pipe&>(p)._sink.get_executor()) { //cannot get the handle from a const object. |