-
Notifications
You must be signed in to change notification settings - Fork 23
RSDK-10305 resources should support close #387
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,8 @@ Name Resource::get_resource_name() const { | |
return get_resource_name(kResource); | ||
} | ||
|
||
// default behavior is to just return | ||
void Resource::close() {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @randhid this was the implementation detail I wanted to run by you. looking at golang, the default behavior for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it true that that is the default behaviour? Mind pointing me to where you are seeing that? My experience is needing to opt-into the no-op behaviour by embedding a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh no, I'm mistaken. The default is a no-op for the
I think I'm a little confused by this, how does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sorry I should have been clearer. I was trying to explain that there are two embeddings available from the resource package: |
||
|
||
} // namespace sdk | ||
} // namespace viam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@randhid per what you were discussing in slack, if we're trying to reconfigure a modular resource that doesn't implement reconfigure we will now 1) stop it if it's stoppable, 2) call its
close
method always, and then 3) rebuild it