mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Make wait_events
support timeout
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
f21394c679
commit
7ddfd42baa
@ -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)
|
||||
|
Reference in New Issue
Block a user