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

WIP backend/rs: Using polling instead of kqueue/epoll #763

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Oct 18, 2024

I've had this in my git stash for a while. I think it wasn't working properly, but I may as well put in in a PR as a proof of concept.

Wayland-rs is often used with calloop, so polling is a dependency anyway. It may as well be used here then.

This requires Poller to implement AsFd, so it won't work on platforms that only have poll. https://docs.rs/polling/3.7.3/polling/struct.Poller.html#impl-AsFd-for-Poller mentions that illumos/solaris implement it. But I don't know if it works properly to insert into another poller.

If we want to support platforms that only have something like poll, we'll need a different sort of API, that doesn't require a single fd for polling multiple clients. But libwayland has the same issue, and there may not be much serious use to wayland-rs on platforms that don't support libwayland.

Other than portability, this is a nice cleanup of a bit of platform-specific code, but it's not a huge difference.

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.

1 participant