Projection test: a failed writer must end the reader loop
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
40a6682e11
commit
19cd3a445a
1 changed files with 8 additions and 1 deletions
|
|
@ -9583,6 +9583,13 @@ Content-Le".to_vec()), |_| {}),
|
|||
}
|
||||
seen
|
||||
});
|
||||
struct Done<'a>(&'a AtomicBool);
|
||||
impl Drop for Done<'_> {
|
||||
fn drop(&mut self) {
|
||||
self.0.store(true, Ordering::Release);
|
||||
}
|
||||
}
|
||||
let _done = Done(&done);
|
||||
let writes = on_thread_with_umask_027(|| {
|
||||
let store_backing = SingleFileMessagePackBackingStore::new(&store);
|
||||
let mut current: Vec<CultCacheEnvelope> = Vec::new();
|
||||
|
|
@ -9600,7 +9607,7 @@ Content-Le".to_vec()), |_| {}),
|
|||
current = next;
|
||||
}
|
||||
});
|
||||
done.store(true, Ordering::Release);
|
||||
drop(_done);
|
||||
(reader.join().unwrap(), writes)
|
||||
});
|
||||
assert!(!observed.is_empty(), "the reader never saw the store");
|
||||
|
|
|
|||
Loading…
Reference in a new issue