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

Fixup Executor::spin_all() regression fix (backport #2517) #2521

Merged
merged 1 commit into from
May 3, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 2, 2024

This is a follow up of #2509 which addresses #2508.


This is an automatic backport of pull request #2517 done by Mergify.

* test(Executors): Added tests for busy waiting

Checks if executors are busy waiting while they should block
in spin_some or spin_all.

Signed-off-by: Janosch Machowinski <[email protected]>

* fix: Reworked spinAll test

This test was strange. It looked like, it assumed that spin_all did
not return instantly. Also it was racy, as the thread could terminate
instantly.

Signed-off-by: Janosch Machowinski <[email protected]>

* fix(Executor): Fixed spin_all not returning instantly is no work was available

Signed-off-by: Janosch Machowinski <[email protected]>

* Update rclcpp/test/rclcpp/executors/test_executors.cpp

Co-authored-by: Tomoya Fujita <[email protected]>
Signed-off-by: jmachowinski <[email protected]>

* test(executors): Added test for busy waiting while calling spin

Signed-off-by: Janosch Machowinski <[email protected]>

* fix(executor): Reset wait_result on every call to spin_some_impl

Before, the method would not recollect available work in case of
spin_some, spin_all. This would lead to the method behaving differently
than to what the documentation states.

Signed-off-by: Janosch Machowinski <[email protected]>

* restore previous test logic for now

Signed-off-by: William Woodall <[email protected]>

* refactor spin_some_impl's logic and improve busy wait tests

Signed-off-by: William Woodall <[email protected]>

* added some more comments about the implementation

Signed-off-by: William Woodall <[email protected]>

---------

Signed-off-by: Janosch Machowinski <[email protected]>
Signed-off-by: jmachowinski <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Co-authored-by: Janosch Machowinski <[email protected]>
Co-authored-by: jmachowinski <[email protected]>
Co-authored-by: Tomoya Fujita <[email protected]>
(cherry picked from commit f7185dc)
@wjwwood
Copy link
Member

wjwwood commented May 2, 2024

CI (re-run after fixing the settings):

  • Linux Build Status
  • Linux-aarch64 Build Status (known mimic related issues)
  • Windows Build Status

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@wjwwood wjwwood merged commit 2c23e3a into jazzy May 3, 2024
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the mergify/bp/jazzy/pr-2517 branch May 3, 2024 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants