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

Poller fails to initialize on old Wine #52

Closed
notgull opened this issue Nov 30, 2022 · 2 comments
Closed

Poller fails to initialize on old Wine #52

notgull opened this issue Nov 30, 2022 · 2 comments

Comments

@notgull
Copy link
Member

notgull commented Nov 30, 2022

When running this code on Wine (wine-6.0.3 (Ubuntu 6.0.3~repack-1)):

use polling::Poller;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a poller.
    let poller = Poller::new()?;
    
    Ok(())
}

It yields this error:

Error: Os { code: 10045, kind: Uncategorized, message: "OS Error 10045 (FormatMessageW() returned error 317)" }

Error 10045 is WSAEOPNOTSUPP. It looks like this crate suffers from tokio-rs/mio#1444 as well.

mio dealt with this issue by not supporting Wine at all. However, libuv deals with this using an implementation that spawns a thread pool that runs select for every registered listener. This strategy is significantly slower than wepoll but is better than crashing. I feel that we can go in either direction here.

Potentially related: async-rs/async-std#943

@taiki-e taiki-e changed the title Poller fails to initialize on Wine Poller fails to initialize on old Wine Nov 30, 2022
@notgull
Copy link
Member Author

notgull commented Dec 1, 2022

With #54 being merged, should we close this issue? If desired, I could probably implement a thread-pool based solution on top of blocking and select to support older versions of Wine. However, as Debian and Ubuntu eventually migrate to newer versions of Wine that support Wepoll, that backend would eventually become obsolete. It may just be in our best interest to explicitly not support older Wines.

@taiki-e
Copy link
Collaborator

taiki-e commented Dec 1, 2022

Yeah, given that it works with the latest wine and that it is relatively easy to install the latest wine from winehq, I think it is not very worth it to implement a new backend for old wine support. (The situation is different from libuv, which added fallback before wine supported them.)

@taiki-e taiki-e closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2022
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