-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixup Executor::spin_all() regression fix (#2517)
* 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]>
- Loading branch information
1 parent
5f912eb
commit f7185dc
Showing
2 changed files
with
199 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters