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

#fix REQREPLY-221: Update RPC examples #723

Conversation

albertorobles2000
Copy link

@albertorobles2000 albertorobles2000 commented Oct 31, 2024

Summary

With this PR we want to update RPC examples to use wait for service

Details and comments

I have also updated the examples so they finish at some point, we need it to test them

Checks

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@@ -81,31 +81,17 @@ class InventoryImpl : public InventoryService {
std::mutex mutex;
};

Copy link
Author

Choose a reason for hiding this comment

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

I created this function because we were creating the participnat in the same scope where we were calling dds::domain::DomainParticipant::finalize_participant_factory();. So the participant destructor was not invoked by the time the factory was finalized. producing a precondition error

@@ -126,7 +112,38 @@ int main(int argc, char *argv[])
::InventoryServiceService service(service_impl, server, params);

std::cout << "InventoryService running... " << std::endl;
server.run();
server.run(std::chrono::seconds(service_timeout));
Copy link
Author

Choose a reason for hiding this comment

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

For us to test the examples they have to run in a given time, they cannot run forever

@alexcamposruiz
Copy link
Contributor

The target branch can't be master; master contains code compatible with 7.3.0. You have to use develop for changes that will be supported in the next release.

There's a caveat here though. The changes to tutorials (Development Guide) need to be compatible with 7.3.0 until the next LTS release, so we need to hold on to that for now. Since the changes are small, I think we could keep the previous wait, and add the new one in a comment:

# For versions 7.4.0 and below:
<current wait>
# For newer versions you can use the following:
# <new wait, commented>

" -q, --quantity <int> Number of items to add or remove\n"\
" Default: 1\n"
" -s, --service-timeout <int> Numbers of senconds the service will run\n"\
" Default: 60\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

let's keep the default unlimited

examples/connext_dds/request_reply/cs/PrimesProgram.cs Outdated Show resolved Hide resolved
examples/connext_dds/remote_procedure_call/py/README.md Outdated Show resolved Hide resolved
@albertorobles2000 albertorobles2000 marked this pull request as ready for review November 5, 2024 08:27
@albertorobles2000 albertorobles2000 changed the base branch from master to develop November 5, 2024 09:38
@albertorobles2000 albertorobles2000 changed the base branch from develop to master November 5, 2024 09:39
@albertorobles2000 albertorobles2000 removed the request for review from jmuros-rti November 5, 2024 09:51
@albertorobles2000
Copy link
Author

The changes have been moved the following PR

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