SyncParametersClient can't be used in component node
@mabelzhang is already working on this.
Since Mar 9, 2021.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
Because SyncParametersClient calls spin_until_future_complete it can't be used in component nodes.
A workaround for this might be to have some way of discovering if the node is a component and then just calling get() on the future instead of trying to spin the node (as the Node should already be added to an executor and executing). Another option would be to leave spinning the Node on an executor up to the implementer of the Node (expect they are spinning it already when they call methods like set_parameters) and change the implementation of SyncParametersClient to block forever (by waiting on the future) if the user failed to start the executor on a separate thread first.
This workaround might not work during initialization if the component manager doesn't start the executor on a separate thread before loading the component nodes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.