Add support for event handlers in Executor#10
Merged
ivanpauno merged 1 commit intofeature/eventsfrom Aug 20, 2020
Merged
Conversation
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
|
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
added a commit
that referenced
this pull request
Aug 20, 2020
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
ivanpauno
added a commit
that referenced
this pull request
Aug 31, 2020
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
ivanpauno
added a commit
that referenced
this pull request
May 17, 2021
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
ivanpauno
added a commit
to ros2-java/ros2_java
that referenced
this pull request
Jan 14, 2022
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
ivanpauno
added a commit
to ros2-java/ros2_java
that referenced
this pull request
Jan 25, 2022
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Subscriptionand thatSubscriptionis 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 😂 .