Keep file-watch observation from serializing unrelated IO
Scope open-registration and rename/remove ordering to overlapping paths; let descriptor mutations and directory creation proceed without that lock. Prove blocked opens/writes cannot stall unrelated namespaces, including a queued rename, and retain post-rename descriptor notifications. Document handler-owned watch lifetimes and narrow paths; test natural idle exit. Card: SAU-359
This commit is contained in:
@@ -108,6 +108,15 @@ fn protocol() {
|
||||
}
|
||||
p.finishes();
|
||||
}
|
||||
// A handler-owned watch does not keep an idle process alive after return,
|
||||
// even though the host never answers the watch and stdin remains open.
|
||||
let mut p = start(&wasm, &dir);
|
||||
p.request("watch_once", json!({"path":"/mailbox"}));
|
||||
let watch = p.read();
|
||||
assert_eq!(watch["method"], "core.watch");
|
||||
p.send(json!({"jsonrpc":"2.0","method":"core.notify","params":{"call":watch["id"],"name":"armed","params":{}}}));
|
||||
assert_eq!(p.read()["result"], Value::Null);
|
||||
p.finishes();
|
||||
let mut p = start(&wasm, &dir);
|
||||
p.request("rpc.discover", json!({}));
|
||||
let d = p.read();
|
||||
|
||||
Reference in New Issue
Block a user