Make wait_events support timeout

This commit is contained in:
Ruihan Li
2024-09-02 15:17:30 +08:00
committed by Tate, Hongliang Tian
parent f21394c679
commit 7ddfd42baa
12 changed files with 78 additions and 75 deletions

View File

@ -190,7 +190,7 @@ impl FileLike for EventFile {
if self.is_nonblocking() {
self.try_read(writer)?;
} else {
self.wait_events(IoEvents::IN, || self.try_read(writer))?;
self.wait_events(IoEvents::IN, None, || self.try_read(writer))?;
}
Ok(read_len)