chore: refactor read-write lock on agent (#2225)

Co-authored-by: Alice Hau <ahau@squareup.com>
This commit is contained in:
Salman Mohammed
2025-04-23 23:46:22 -03:00
committed by GitHub
parent 85e2ee3984
commit 199fa6adbc
24 changed files with 409 additions and 237 deletions
+4 -7
View File
@@ -739,10 +739,10 @@ mod tests {
thread::sleep(Duration::from_millis(i * 10));
let extension_key = format!("extension_{}", i);
let mut values = config.load_values()?;
values.insert(
extension_key.clone(),
// Use set_param which handles concurrent access properly
config.set_param(
&extension_key,
serde_json::json!({
"name": format!("test_extension_{}", i),
"version": format!("1.0.{}", i),
@@ -752,10 +752,7 @@ mod tests {
"option2": i
}
}),
);
// Write all values atomically
config.save_values(values)?;
)?;
Ok(())
});
handles.push(handle);