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

Clearly document lifetime expectations for CommandSender. #7067

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Problem

Documentation for CommandSender lifetime does not match reality.

Change overview

Fix the documentation

Testing

Comment-only change, no functional changes.

@@ -100,7 +100,7 @@ class InteractionModelEngine : public Messaging::ExchangeDelegate

/**
* Retrieve a CommandSender that the SDK consumer can use to send a set of commands. If the call succeeds,
* the consumer is responsible for calling Shutdown() on the CommandSender once it's done using it.
* see CommandSender documentation for lifetime handling.
Copy link
Contributor

@andy31415 andy31415 May 25, 2021

Choose a reason for hiding this comment

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

nit: redirecting from a doc to another doc is generally somewhat inconvenient for reads of code. Don't have a better suggestion though beside some more invasive changes that would not require documentation to figure out lifetime (smart-pointer/handle usage).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was not too happy about this either, not least because it's not pointing directly at the relevant docs over there, but if I did that I'd be pointing to a function name that can also change... I couldn't find a nicer solution just with documentation, unfortunately. :(

@jelderton jelderton merged commit 0d14370 into project-chip:master May 25, 2021
@bzbarsky-apple bzbarsky-apple deleted the fix-command-sender-docs branch May 25, 2021 22:13
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants