| author | |
| committer | |
| log | 8bdc63d4fcfde20f31903404a9ea024f87f8a8fd |
| tree | 93fbcadf6ce6a8cf11df5c930fb8c427feef7935 |
| parent | b77e64db05f9b062024344f4a5a1bed1cb8e7014 |
| signature | Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU |
kept_sections_open_at_once checks that readying a section another holds
leaves it at once, rather than waiting for the owner as open does, for up to
TIMEOUT * 3. It bounded that one attempt at a second, which a loaded gate
(20261019-181040) exceeded: prefetch passes open_by a deadline of now, so it
tries once and never sleeps, and the second was only the machine. It now
bounds it by TIMEOUT, still a third of what waiting would take.
Assisted-by: claude-opus-5.51 files changed, 3 insertions(+), 1 deletions(-)
crates/snowbound/src/library.rs+3-1| ... | ... | @@ -1915,7 +1915,9 @@ mod tests { |
| 1915 | 1915 | drop(readied); |
| 1916 | 1916 | let start = Instant::now(); |
| 1917 | 1917 | assert!(library.prefetch(&first, || {}).is_err()); |
| 1918 | assert!(start.elapsed() < Duration::from_secs(1)); | |
| 1918 | // Well short of the `TIMEOUT * 3` `open` waits for an owner, however loaded the | |
| 1919 | // machine running the test. | |
| 1920 | assert!(start.elapsed() < TIMEOUT); | |
| 1919 | 1921 | library.keep(&first, opened); |
| 1920 | 1922 | library.prefetch(&second, || {}).unwrap(); |
| 1921 | 1923 | library.close_kept(); |