Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions include/boost/process/detail/posix/asio_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,22 @@ class basic_streambuf;
typedef basic_streambuf<std::allocator<char>> streambuf;
class io_context;

class executor;

#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
class signal_set_service;
template <typename SignalSetService>

template<typename Executor>
class basic_signal_set;
typedef basic_signal_set<signal_set_service> signal_set;
#else /* defined(BOOST_ASIO_ENABLE_OLD_SERVICES) */
class signal_set;
#endif /* defined(BOOST_ASIO_ENABLE_OLD_SERVICES) */

typedef basic_signal_set<executor> signal_set;

template <typename Handler>
class basic_yield_context;

namespace posix {

#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
class stream_descriptor_service;

template <typename StreamDesscriptorService>
template <typename Executor>
class basic_stream_descriptor;
typedef basic_stream_descriptor<stream_descriptor_service> stream_descriptor;
#else /* defined(BOOST_ASIO_ENABLE_OLD_SERVICES) */
class stream_descriptor;
#endif /* defined(BOOST_ASIO_ENABLE_OLD_SERVICES) */

typedef basic_stream_descriptor<executor> stream_descriptor;

} //posix
} //asio
Expand Down
4 changes: 2 additions & 2 deletions include/boost/process/detail/posix/async_pipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,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_executor().context()),
_sink( const_cast<async_pipe&>(p)._sink.get_executor().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.
Expand Down
23 changes: 6 additions & 17 deletions include/boost/process/detail/windows/asio_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,22 @@ class basic_streambuf;
typedef basic_streambuf<std::allocator<char>> streambuf;
class io_context;

class executor;

template <typename Handler>
class basic_yield_context;

namespace windows {

#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
class stream_handle_service;

template <typename StreamHandleService>
template <typename Executor>
class basic_stream_handle;

typedef basic_stream_handle<stream_handle_service> stream_handle;
#else /* defined(BOOST_ASIO_ENABLE_OLD_SERVICES) */
class stream_handle;
#endif /* defined(BOOST_ASIO_ENABLE_OLD_SERVICES) */


#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
class object_handle_service;
typedef basic_stream_handle<executor> stream_handle;

template <typename ObjectHandleService>
template <typename Executor>
class basic_object_handle;

typedef basic_object_handle<object_handle_service> object_handle;
#else /* defined(BOOST_ASIO_ENABLE_OLD_SERVICES) */
class object_handle;
#endif /* defined(BOOST_ASIO_ENABLE_OLD_SERVICES) */
typedef basic_object_handle<executor> object_handle;

} //windows
} //asio
Expand Down
16 changes: 8 additions & 8 deletions include/boost/process/detail/windows/async_pipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,25 @@ class async_pipe
if (_sink.is_open())
{
_sink.close();
_sink = handle_type(_sink.get_executor().context());
_sink = handle_type(_sink.get_executor());
}
if (_source.is_open())
{
_source.close();
_source = handle_type(_source.get_executor().context());
_source = handle_type(_source.get_executor());
}
}
void close(boost::system::error_code & ec)
{
if (_sink.is_open())
{
_sink.close(ec);
_sink = handle_type(_sink.get_executor().context());
_sink = handle_type(_sink.get_executor());
}
if (_source.is_open())
{
_source.close(ec);
_source = handle_type(_source.get_executor().context());
_source = handle_type(_source.get_executor());
}
}

Expand Down Expand Up @@ -238,8 +238,8 @@ class async_pipe


async_pipe::async_pipe(const async_pipe& p) :
_source(const_cast<handle_type&>(p._source).get_executor().context()),
_sink (const_cast<handle_type&>(p._sink).get_executor().context())
_source(const_cast<handle_type&>(p._source).get_executor()),
_sink (const_cast<handle_type&>(p._sink).get_executor())
{
auto proc = ::boost::winapi::GetCurrentProcess();

Expand Down Expand Up @@ -338,8 +338,8 @@ async_pipe& async_pipe::operator=(const async_pipe & p)
throw_last_error("Duplicate Pipe Failed");

//so we also assign the io_context
_source = ::boost::asio::windows::stream_handle(source_in.get_executor().context(), source);
_sink = ::boost::asio::windows::stream_handle(source_in.get_executor().context(), sink);
_source = ::boost::asio::windows::stream_handle(source_in.get_executor(), source);
_sink = ::boost::asio::windows::stream_handle(source_in.get_executor(), sink);

return *this;
}
Expand Down
2 changes: 1 addition & 1 deletion include/boost/process/detail/windows/wait_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace boost { namespace process { namespace detail { namespace windows {
struct group_handle;


inline bool wait_impl(const group_handle & p, std::error_code & ec, int wait_time)
inline bool wait_impl(const group_handle & p, std::error_code & ec, std::chrono::system_clock::rep wait_time)
{
::boost::winapi::DWORD_ completion_code;
::boost::winapi::ULONG_PTR_ completion_key;
Expand Down