Notify all pending waiters on close

This commit is contained in:
Johannes Leupolz 2026-04-17 13:15:31 +00:00
parent 152ffd9711
commit aea990946d

View file

@ -137,6 +137,16 @@ impl PollState {
}
}
impl Drop for PollState {
fn drop(&mut self) {
//when the device closes, notify all pending waiters
let old_handle = self.take_waiters();
if let Some(mut old_handle) = old_handle {
old_handle.notify();
}
}
}
#[derive(Debug)]
pub struct VuInputState {
pub file: File,