Skip to content

update guard condition by managing multiple items#527

Closed
iuhilnehc-ynos wants to merge 2 commits intoros2:masterfrom
iuhilnehc-ynos:topic-guardcondition-manage-cond-list
Closed

update guard condition by managing multiple items#527
iuhilnehc-ynos wants to merge 2 commits intoros2:masterfrom
iuhilnehc-ynos:topic-guardcondition-manage-cond-list

Conversation

@iuhilnehc-ynos
Copy link
Copy Markdown
Contributor

@iuhilnehc-ynos iuhilnehc-ynos commented Apr 25, 2021

related to ros2/rclcpp#1611

Signed-off-by: Chen Lihui lihui.chen@sony.com

…ables

Signed-off-by: Chen Lihui <lihui.chen@sony.com>
@iuhilnehc-ynos iuhilnehc-ynos force-pushed the topic-guardcondition-manage-cond-list branch from 4e4ab1b to 33ea304 Compare April 25, 2021 08:12
@fujitatomoya fujitatomoya self-requested a review April 26, 2021 06:38
std::atomic_bool hasTriggered_;
std::mutex * conditionMutex_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_);
std::condition_variable * conditionVariable_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_);
std::list<std::pair<std::mutex *, std::condition_variable *>> conditions_
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should make this a std::vector? The most common operations (in my opinion) will be trigger() which has to loop over this sequence of pairs. If removing a pair is expensive (inside of detachCondition()), I don't think that's as important.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I'll update it.

@wjwwood
Copy link
Copy Markdown
Member

wjwwood commented Apr 26, 2021

CI:

  • Linux Build Status
  • Linux Build Status (without this patch, to show failing test)
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@iuhilnehc-ynos
Copy link
Copy Markdown
Contributor Author

iuhilnehc-ynos commented Apr 27, 2021

CI:

  • Linux Build Status

I noted this rmw_connextdds issue at the ros2/rclcpp#1611 (comment)

  • Linux Build Status (without this patch, to show failing test)

From the comments behind, I think running this CI is intent to use https://github.com/ros2/rclcpp/pull/1640 but not https://github.com/ros2/rmw_fastrtps/pull/527, but there is no repos_url setting for the CI parameter.

  • Linux-aarch64 Build Status

expected because of using use_connextdds: false

  • macOS Build Status

rmw_connextdds issue as metioned before.

  • Windows Build Status

rmw_connextdds issue as metioned before.

Co-authored-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
@iuhilnehc-ynos
Copy link
Copy Markdown
Contributor Author

@wjwwood

I have made a PR for rmw_connextdds

Comment on lines +41 to 43
// TODO(iuhilnehc-ynos): conditionMutex is not used, remove it
std::unique_lock<std::mutex> clock(*cond.first);
clock.unlock();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Quick question, are these actually needed? just curious why not removing now?

@iuhilnehc-ynos
Copy link
Copy Markdown
Contributor Author

not a correct fix, close it

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