Skip to content

Fix spurious WouldBlock errors when reading GPIO events - #8

Open
joshua-caddell wants to merge 1 commit into
katyo:masterfrom
joshua-caddell:master
Open

Fix spurious WouldBlock errors when reading GPIO events#8
joshua-caddell wants to merge 1 commit into
katyo:masterfrom
joshua-caddell:master

Conversation

@joshua-caddell

Copy link
Copy Markdown

Wrap the non-blocking read in a loop that clears the cached readiness flag on WouldBlock, re-arming the async wakeup. Previously, a spurious epoll notification would propagate as an error instead of retrying the read.

This is the correct implementation for AsyncFd according to the documentation in tokio's io/async_fd.rs.

Wrap the non-blocking read in a loop that clears the cached readiness flag on WouldBlock, re-arming the async wakeup. Previously, a spurious epoll notification would propagate as an error instead of retrying the read.

This is the correct implementation for AsyncFd according to the documentation in tokio's io/async_fd.rs.
@d3jong

d3jong commented Jul 17, 2026

Copy link
Copy Markdown

@katyo please merge this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants