提交 d0a40a4b 编写于 作者: L Liu Jiaming 提交者: Calvin Miao

clean & clear code

上级 0ecd669f
......@@ -205,12 +205,12 @@ bool Client<Request, Response>::Init() {
role.set_channel_id(channel_id);
response_receiver_ = transport->CreateReceiver<Response>(
role,
[=](const std::shared_ptr<Response>& request,
[=](const std::shared_ptr<Response>& response,
const transport::MessageInfo& message_info,
const proto::RoleAttributes& reader_attr) {
(void)message_info;
(void)reader_attr;
response_callback_(request, message_info);
response_callback_(response, message_info);
},
proto::OptionalMode::RTPS);
if (response_receiver_ == nullptr) {
......
......@@ -79,15 +79,7 @@ class Service : public ServiceBase {
Service() = delete;
~Service() {
inited_ = false;
{
std::lock_guard<std::mutex> lg(queue_mutex_);
tasks_.clear();
}
condition_.notify_all();
if (thread_.joinable()) {
thread_.join();
}
destroy();
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册