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