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

GTK AsyncFileDialog seems to spinlock #150

Closed
valadaptive opened this issue Sep 21, 2023 · 1 comment
Closed

GTK AsyncFileDialog seems to spinlock #150

valadaptive opened this issue Sep 21, 2023 · 1 comment

Comments

@valadaptive
Copy link
Contributor

My application opens an AsyncFileDialog and uses block_on to wait for it on another thread (it's easier to just spawn a thread and poll for completion every frame than pull in an entire async runtime).

However, the GTK AsyncFileDialog in particular seems to use 100% CPU on one of my cores while it's open. This doesn't happen if I run it synchronously or if I use the xdg-portal dialog instead. I'm not sure if I'm doing something wrong by using block_on--I've tried both the futures version and the futures-lite version of block_on and they both seem to try and park the thread yet consume 100% CPU anyway.

In addition, the GTK file dialog will very rarely hang when a file is selected and opened. This happens in both the sync and async versions, and it doesn't use any CPU--it successfully picks the file, hands control back to the application, and just never closes. This may be related to the above issue, but I'm not sure.

I'd prefer to use the GTK dialog if possible (the xdg-portal version doesn't respect the user's theme and sometimes takes several seconds to open).

@valadaptive
Copy link
Contributor Author

Resolved by #152

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 a pull request may close this issue.

1 participant