-
Notifications
You must be signed in to change notification settings - Fork 523
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
PickSingleFileAsync await call hangs app #1708
Comments
|
So a thread::spawn() maybe using an Arc<Mutex<>> could be the way to go here? |
The problem is in the difference between C++/WinRT coroutines and Rust async functions. WinRT async assumes hot-start whereas async functions are cold-start, meaning the Rust async function needs a driver whereas WinRT async is meant to be self-driving. This is something I'm still noodling on, but that's the gist of the problem. |
And no, using another thread won't help because then the UI calls will originate from a non-UI thread and that is not typically supported. |
Thanks for the explanation. |
What about using |
Yes, that's what C++/WinRT uses behind the scenes for |
The closures for RunAsync lead to 'static lifetime requirements on the xaml app Window - leading to cumbersome code. |
Does a xaml app require additional API calls before showing a file picker that are not required by the C++/WinRT equivalent?
The text was updated successfully, but these errors were encountered: