New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avoid using dds common public mutex directly #474
avoid using dds common public mutex directly #474
Conversation
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
CI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM given the changes in ros2/rmw_dds_common#73, but I would have one more look at some details there (as I wrote in a review comment).
I'll mark this approved: if ros2/rmw_dds_common#73 changes, then this'll have to change anyway and get reviewed again; but if the decision is that the other PR is good as it is (I'm only suggesting another look, after all) then this seems ok as it is, too.
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much nicer this way, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left just a few comments, nothing major. I like this refactoring a lot.
rmw_cyclonedds_cpp/src/rmw_node.cpp
Outdated
@@ -5097,7 +5070,8 @@ static void rmw_fini_cs(CddsCS * cs) | |||
dds_delete(cs->pub->enth); | |||
} | |||
|
|||
static rmw_ret_t destroy_client(const rmw_node_t * node, rmw_client_t * client) | |||
static rmw_ret_t destroy_client( | |||
const rmw_node_t * node, rmw_client_t * client, bool destroy_graph = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please describe why we need the destroy_graph
boolean here? It isn't totally clear to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After using make_scope_exit
in the rmw_create_client
, I removed the destroy_client
and move its original implementation code into rmw_destroy_client
since destroy_client
is only called once, so there is no boolean flag.
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with green CI.
It depends on ros2/rmw_dds_common#73