Skip to content

Commit

Permalink
add workaround for level-triggered selectors
Browse files Browse the repository at this point in the history
Like Windows, HermitOS based on level-triggered selectors.
Consequently, HermitOS depends on the workaround, which was written
for Windows.
  • Loading branch information
stlankes authored and mkroening committed Sep 17, 2024
1 parent b9ab8d6 commit d1736f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/src/io/poll_evented.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ feature! {
// that the socket buffer is full. Unfortunately this assumption
// fails for level-triggered selectors (like on Windows or poll even for
// UNIX): https://github.com/tokio-rs/tokio/issues/5866
if n > 0 && (!cfg!(windows) && !cfg!(mio_unsupported_force_poll_poll) && n < buf.len()) {
if n > 0 && (!(cfg!(windows) || cfg!(target_os = "hermit")) && !cfg!(mio_unsupported_force_poll_poll) && n < buf.len()) {
self.registration.clear_readiness(evt);
}

Expand Down

0 comments on commit d1736f4

Please sign in to comment.