-
Notifications
You must be signed in to change notification settings - Fork 16
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
Do we need both sync and async APIs? #45
Comments
It would be nice to provide a sync method that uses I also think we should switch to |
This is a bit tricky because the api for every other platform is sync, and wrapping them in async isn't great. On the other hand xdg dekstop portals can timeout which takes 30 seconds (it's caused by broken portals setups, but it's somewhat common on DIY/tiling compositors, which is why I was hesitant to remove Also the more I think about how people utilize this crate, I'm starting to think prepending the initial value to With that said I think having As I commented in #40, I think returning
|
That's a good point. Application initialization is generally synchronous. |
Considering the async API isn't working at all on macOS and it's not trivial to figure out how make it work (#47), I'm wondering if we should make the async API platform-specific for the initial release of the async API. |
I am wondering if we really need to keep the sync API. If we get rid of it, users wanting to use this crate in sync contexts could simply use
pollster::block_on
in their code and we could advise that in documentation. Alternatively, we could put the sync API behind a feature flag so users that don't need it don't need to bring in the pollster dependency.The text was updated successfully, but these errors were encountered: