pub async fn wait_for(
home: &Path,
cache_dir: &Path,
owner: &Owner,
budget: Duration,
poll: Duration,
) -> Result<Guard>Expand description
Acquire the lease for cache_dir, waiting out contention rather than
failing on the first busy owner — but never past budget, and the wait
comes out of that same budget rather than a second, unbounded one. A
caller already has a node timeout; this is that timeout, not a new clock
next to it, which is what keeps a wait from becoming the “無期限待機”
AGENTS.md’s own build-cache section warns is never acceptable. The error
on timeout names who is still holding it, for the event this gets logged
into.