MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / refresh

Method refresh

crates/openshell-core/src/gpu.rs:166–173  ·  view source on GitHub ↗

Replace the cached inventory snapshot without resetting the cursor.

(&self, inventory: CdiGpuInventory, allow_all_devices: bool)

Source from the content-addressed store, hash-verified

164
165 /// Replace the cached inventory snapshot without resetting the cursor.
166 pub fn refresh(&self, inventory: CdiGpuInventory, allow_all_devices: bool) {
167 let mut state = self
168 .state
169 .write()
170 .expect("CDI GPU selector state lock poisoned");
171 state.inventory = inventory;
172 state.allow_all_devices = allow_all_devices;
173 }
174
175 /// Return the cached normalized inventory snapshot.
176 #[must_use]

Calls 1

writeMethod · 0.45