Support wait_interruptible for Poller

This commit is contained in:
Jianfeng Jiang
2023-09-26 17:45:53 +08:00
committed by Tate, Hongliang Tian
parent d2aa06cbe2
commit 50761a5cc5
12 changed files with 56 additions and 22 deletions

View File

@ -259,7 +259,7 @@ impl Socket for DatagramSocket {
return_errno_with_message!(Errno::EAGAIN, "try to receive again");
}
// FIXME: deal with recvfrom timeout
poller.wait(None)?;
poller.wait_interruptible(None)?;
}
}
}

View File

@ -58,7 +58,7 @@ impl ConnectedStream {
return_errno_with_message!(Errno::EAGAIN, "try to recv again");
}
// FIXME: deal with receive timeout
poller.wait(None)?;
poller.wait_interruptible(None)?;
}
}
}

View File

@ -152,7 +152,7 @@ impl InitStream {
return_errno_with_message!(Errno::EAGAIN, "try connect again");
} else {
// FIXME: deal with connecting timeout
poller.wait(None)?;
poller.wait_interruptible(None)?;
}
}
}

View File

@ -46,7 +46,7 @@ impl ListenStream {
return_errno_with_message!(Errno::EAGAIN, "try accept again");
}
// FIXME: deal with accept timeout
poller.wait(None)?;
poller.wait_interruptible(None)?;
}
continue;
};

View File

@ -133,7 +133,7 @@ impl BacklogTable {
// FIXME: deal with accept timeout
if events.is_empty() {
poller.wait(None)?;
poller.wait_interruptible(None)?;
}
}
}