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 support for event stream merging for Python node API #339

Merged
merged 15 commits into from
Aug 24, 2023

Conversation

phil-opp
Copy link
Collaborator

Adds a merge_external_events method that allows to merge an external event stream, e.g. from the dora-ros2-bridge. This allows waiting for multiple event streams at once without spawning any background threads.

We cannot use generics for methods exposed to Python, so the merge_external_events method requires an argument of the new ExternalEventStream type. This type wraps a Box<dyn Stream> and is thus non-generic. Downstream crates need to use this type to allow event stream merging in Python.

@phil-opp
Copy link
Collaborator Author

@phil-opp phil-opp marked this pull request as ready for review August 23, 2023 07:55
@haixuanTao
Copy link
Collaborator

Nice!

@phil-opp phil-opp merged commit 8e7688a into main Aug 24, 2023
@phil-opp phil-opp deleted the python-ros2-bridge-example branch August 24, 2023 09:03
@haixuanTao haixuanTao mentioned this pull request Sep 6, 2023
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.

2 participants