mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Work around some compile errors for boost::asio::generic::stream_protocol (#6545)
This commit is contained in:
parent
3bb680a719
commit
634b437543
3 changed files with 14 additions and 3 deletions
|
@ -24,7 +24,12 @@ ObjectStoreNotificationManager::ObjectStoreNotificationManager(
|
||||||
|
|
||||||
RAY_ARROW_CHECK_OK(store_client_.Subscribe(&c_socket_));
|
RAY_ARROW_CHECK_OK(store_client_.Subscribe(&c_socket_));
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
socket_.assign(local_stream_protocol(), c_socket_, ec);
|
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
|
||||||
|
local_stream_protocol sp;
|
||||||
|
#else // TODO(mehrdadn): HACK: FIXME: This is just to get things compiling!
|
||||||
|
local_stream_protocol sp(AF_UNIX, 0);
|
||||||
|
#endif
|
||||||
|
socket_.assign(sp, c_socket_, ec);
|
||||||
assert(!ec.value());
|
assert(!ec.value());
|
||||||
NotificationWait();
|
NotificationWait();
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,13 @@ Raylet::Raylet(boost::asio::io_service &main_service, const std::string &socket_
|
||||||
node_manager_(main_service, node_manager_config, object_manager_, gcs_client_,
|
node_manager_(main_service, node_manager_config, object_manager_, gcs_client_,
|
||||||
object_directory_),
|
object_directory_),
|
||||||
socket_name_(socket_name),
|
socket_name_(socket_name),
|
||||||
acceptor_(main_service, local_stream_protocol::endpoint(socket_name)),
|
acceptor_(main_service, local_stream_protocol::endpoint(
|
||||||
|
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
|
||||||
|
socket_name
|
||||||
|
#else // TODO(mehrdadn): HACK: FIXME: This is just to get things compiling!
|
||||||
|
socket_name.data(), socket_name.size()
|
||||||
|
#endif
|
||||||
|
)),
|
||||||
socket_(main_service) {
|
socket_(main_service) {
|
||||||
// Start listening for clients.
|
// Start listening for clients.
|
||||||
DoAccept();
|
DoAccept();
|
||||||
|
|
|
@ -76,7 +76,7 @@ class Raylet {
|
||||||
std::string socket_name_;
|
std::string socket_name_;
|
||||||
|
|
||||||
/// An acceptor for new clients.
|
/// An acceptor for new clients.
|
||||||
local_stream_protocol::acceptor acceptor_;
|
boost::asio::basic_socket_acceptor<local_stream_protocol> acceptor_;
|
||||||
/// The socket to listen on for new clients.
|
/// The socket to listen on for new clients.
|
||||||
local_stream_protocol::socket socket_;
|
local_stream_protocol::socket socket_;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue