Skip to content

Commit

Permalink
Trigger the guard condition when the graph changes.
Browse files Browse the repository at this point in the history
This will ensure that any waiters on the wait_set will be
woken up immediately when the graph changes.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Jun 26, 2024
1 parent d8d3a69 commit 519cc8d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rmw_zenoh_cpp/src/rmw_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ static void graph_sub_data_handler(
context_impl->graph_cache->parse_del(keystr._cstr);
break;
default:
break;
return;
}

rmw_ret_t rmw_ret = rmw_trigger_guard_condition(context_impl->graph_guard_condition);
if (RMW_RET_OK != rmw_ret) {
RCUTILS_LOG_WARN_NAMED(
"rmw_zenoh_cpp",
"[graph_sub_data_handler] Unable to trigger graph guard condition"
);
}
}

Expand Down

0 comments on commit 519cc8d

Please sign in to comment.