Skip to content
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

Fix race between timeout and transform ready callback #143

Merged
merged 2 commits into from Aug 6, 2019

Conversation

jacobperron
Copy link
Member

The timer-request handle map is used to check if the promise to the user has already been set.
For the transformable request callback, we loop over the values of the map to check if the request is still valid.
Alternatively, we could implement a bi-directional map for efficiency, but I don't expect the number of entries in the timer-request map to be large so it seems like a pre-mature optimization.

Fixes #141

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
The timer-request handle map is used to check if the promise to the user has already been set.
For the transformable request callback, we loop over the values of the map to check if the request is still valid.
Alternatively, we could implement a bi-directional map for efficiency, but I don't expect the number of entries in
the timer-request map to be large so it seems like a pre-mature optimization.

Fixes #141

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Member Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@jacobperron jacobperron added the in review Waiting for review (Kanban column) label Aug 6, 2019
@jacobperron jacobperron merged commit 4146027 into ros2 Aug 6, 2019
@delete-merged-branch delete-merged-branch bot deleted the jacob/fix_141 branch August 6, 2019 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raise std::future_error: Promise already satisfied
3 participants