tty: fix ring getting stuck with stale wakers registered

This commit is contained in:
Mark Poliakov 2024-12-29 13:04:51 +02:00
parent 7844116411
commit 1d58b77241

View File

@ -179,7 +179,7 @@ impl<T: Copy> LossyRingQueue<T> {
pub fn write(&self, value: T) {
self.ring.lock().write(value);
self.read_notify.wake_one();
self.read_notify.wake_all();
}
pub fn write_multiple(&self, values: &[T]) {
@ -187,7 +187,7 @@ impl<T: Copy> LossyRingQueue<T> {
for &value in values {
lock.write(value);
}
self.read_notify.wake_one();
self.read_notify.wake_all();
}
pub fn try_read(&self) -> Option<T> {