-
Notifications
You must be signed in to change notification settings - Fork 71
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
AsyncFileDialog blocks on Windows #190
Comments
In fact, even to solve it, I think you should spawn another task to call |
That's not how |
@valadaptive I mean, the thread won't be blocked, but the task will be blocked, even it's async |
Yes, but in the current code, the thread that the executor is running on is blocked, because the future blocks when polled. This means that no other futures can be executed while the file dialog is open, and if the executor is running on the main thread, the application itself will freeze. That's what I'm fixing. |
Resolved by #191 |
AsyncFileDialog should allow the application to continue running while the file dialog is open, but on Windows, it causes it to freeze and eventually cause a "not responding" popup. This seems to be due to mutex shenanigans where
ThreadFuture
locks the mutex immediately in the thread that it spawns, then blocks on it when youpoll
it.The text was updated successfully, but these errors were encountered: