From e28e4641585cd213d8cc713610163e662c63bb5b Mon Sep 17 00:00:00 2001 From: mehrdadn Date: Fri, 29 Nov 2019 16:09:46 -0800 Subject: [PATCH] Convert io_service_ from reference to smart pointer (#6285) --- src/ray/gcs/redis_context.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ray/gcs/redis_context.h b/src/ray/gcs/redis_context.h index 491057894..1d0a6f788 100644 --- a/src/ray/gcs/redis_context.h +++ b/src/ray/gcs/redis_context.h @@ -89,19 +89,19 @@ class RedisCallbackManager { : callback_(callback), is_subscription_(is_subscription), start_time_(start_time), - io_service_(io_service) {} + io_service_(&io_service) {} void Dispatch(std::shared_ptr &reply) { std::shared_ptr self = shared_from_this(); if (callback_ != nullptr) { - io_service_.post([self, reply]() { self->callback_(std::move(reply)); }); + io_service_->post([self, reply]() { self->callback_(std::move(reply)); }); } } RedisCallback callback_; bool is_subscription_; int64_t start_time_; - boost::asio::io_service &io_service_; + boost::asio::io_service *io_service_; }; int64_t add(const RedisCallback &function, bool is_subscription,