Does Tokio on Linux use blocking IO or not?

99 points Paul-E0 60 comments

For some reason I had it in my head that Tokio used blocking IO on Linux under the hood. When I look at the mio docs the docs say epoll is used, which is nominally async/non-blocking. but this message from a tokio contributor says epoll is not a valid path to non-blocking IO.

I'm confused by this. Is the contributor saying that mio uses epoll, but that epoll is actually a blocking IO API? That would seem to defeat much of the purpose of epoll; I thought it was supposed to be non-blocking.