mirror of
https://github.com/wassname/ray.git
synced 2026-07-23 13:10:11 +08:00
Convert io_service_ from reference to smart pointer (#6285)
This commit is contained in:
@@ -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<CallbackReply> &reply) {
|
||||
std::shared_ptr<CallbackItem> 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,
|
||||
|
||||
Reference in New Issue
Block a user