tty: fix ring getting stuck with stale wakers registered
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user