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

Add a synchronization mechanism for the AdvanceableRunner #403

Merged
merged 4 commits into from
Sep 2, 2021

Conversation

GiulioRomualdi
Copy link
Member

This PR introduces a synchronization mechanism for the AdvanceableRunner class. The Barrier class has been developed, the code was taken from here.

c++20 introduces the barrier class however since this repo is based on c++17, the implementation of this new class was required. Barrier is then used in the run method of the advanceable runner to synchronize the startup of all the threads.

@GiulioRomualdi GiulioRomualdi self-assigned this Sep 1, 2021
Copy link
Member

@diegoferigo diegoferigo left a comment

Choose a reason for hiding this comment

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

Passing by :)

src/System/src/Barrier.cpp Outdated Show resolved Hide resolved
src/System/include/BipedalLocomotion/System/Barrier.h Outdated Show resolved Hide resolved
src/System/include/BipedalLocomotion/System/Barrier.h Outdated Show resolved Hide resolved
src/System/src/Barrier.cpp Outdated Show resolved Hide resolved
src/System/CMakeLists.txt Outdated Show resolved Hide resolved
@GiulioRomualdi
Copy link
Member Author

Hi @diegoferigo thank you for reviewing, I applied all the changes you suggested

@GiulioRomualdi GiulioRomualdi merged commit 583645d into master Sep 2, 2021
@GiulioRomualdi GiulioRomualdi deleted the system/barrier branch September 2, 2021 10:06
@traversaro
Copy link
Collaborator

The PR seems nice, but just to understand what is the intended use of this feature?

@GiulioRomualdi
Copy link
Member Author

GiulioRomualdi commented Sep 2, 2021

Hi @traversaro I used this feature here: GiulioRomualdi/centroidal-mpc-walking@8c11834

In this application, I've two blocks running at a different rate and I would like to start the two threads simultaneously

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants