Skip to content

resource: moved managed field into ResourceGroup#38

Open
noahj256 wants to merge 1 commit intolanl:mainfrom
noahj256:unmanage
Open

resource: moved managed field into ResourceGroup#38
noahj256 wants to merge 1 commit intolanl:mainfrom
noahj256:unmanage

Conversation

@noahj256
Copy link
Collaborator

@noahj256 noahj256 commented Feb 5, 2026

Also changes management loop to respect new managed flag.

Also changes management loop to respect new managed flag.
*res.managed.lock().unwrap() = payload.managed;
for rg in cluster.resource_groups() {
if rg.root.id == resource_id {
*rg.managed.lock().unwrap() = payload.managed;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be updated to use the set_managed() method rather than directly accessing the field.

// single object that can carry data (i.e., an Enum that says the reason for the notification)
pub switch_host: tokio::sync::Notify,

pub managed: Mutex<bool>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This field should be made private so that the public interface is constrained to the set_managed() and get_managed() methods.

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