Skip to content

Conversation

@ivanpauno
Copy link
Collaborator

What the title says ☝️ .

I haven't added a test for this yet.
I need first to have an event that I can trigger reliably, and I cannot do that with liveliness lost because a lot of API is missing for that (manually assert liveliness API, liveliness policy in QoSProfile, ...).

I think that I will add support to a different event type that can be triggered more easily (maybe I can still get a liveliness lost event with automatic liveliness, I have to double check).

We also should double check what subset of the events machinery we actually need.


On a different note, the current executor code is a bit complex and a lots of things could be simplified (there's a lot of unnecessary iterations that could be merged). I didn't aim to fix that here.

There's also an ownership problem: if you dispose a Subscription and that Subscription is being used in another thread by an Executor, a segfault is likely to happen.

Last but not least: the multithreaded executor creates a bunch of threads that are mutually exclusive, so only one thread can do something at a time.
If wait/execute aren't decoupled the multithreaded executor isn't really useful 😂 .

@ivanpauno ivanpauno added the enhancement New feature or request label Aug 18, 2020
@ivanpauno ivanpauno requested a review from jacobperron August 18, 2020 19:05
@ivanpauno ivanpauno self-assigned this Aug 18, 2020
Copy link

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM

@jacobperron
Copy link

Regarding issues with the existing code/architecture. It's not required, but feel free to open up issues upstream: https://github.com/ros2-java/ros2_java. I'd like to ultimately land changes there if possible.

@ivanpauno ivanpauno changed the title Add support for events in Executor Add support for event handlers in Executor Aug 20, 2020
@ivanpauno ivanpauno merged commit baadb7c into feature/events Aug 20, 2020
ivanpauno added a commit that referenced this pull request Aug 20, 2020
@ivanpauno ivanpauno deleted the ivanpauno/events-executor-support branch August 20, 2020 13:07
ivanpauno added a commit that referenced this pull request Aug 31, 2020
ivanpauno added a commit that referenced this pull request May 17, 2021
ivanpauno added a commit to ros2-java/ros2_java that referenced this pull request Jan 14, 2022
ivanpauno added a commit to ros2-java/ros2_java that referenced this pull request Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants