Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A comparation with mio #182

Open
tisonkun opened this issue Jan 23, 2024 · 1 comment
Open

A comparation with mio #182

tisonkun opened this issue Jan 23, 2024 · 1 comment

Comments

@tisonkun
Copy link
Contributor

@notgull how do you compare polling with mio? I suppose this is a common tech decision topic ..

From my understanding, their supported features and API style are similar, while

  • mio defines its own TcpListener and TcpStream type; polling uses std's ones.

Previously, polling define a plain-old Event struct but it's now almost the same wit mio's.

Anything else?

@notgull
Copy link
Member

notgull commented Jan 24, 2024

polling supports other modes of polling (oneshot mode and level triggered mode) and is also unsafe to use as it enforced I/O safety.

Generally mio is intended to be used standalone while polling is intended to be used as a lower level brick in a higher level API (such as async-io or calloop).

@notgull notgull closed this as completed Feb 7, 2024
@notgull notgull reopened this Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants