-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support async commands with Window handle on Windows #2078
Comments
I believe #[cfg(windows)]
pub fn hwnd(&self) -> crate::Result<*mut std::ffi::c_void> {
self.window.dispatcher.hwnd().map_err(Into::into)
} |
As a work around, i am no longer using |
You should move the window to the try_for_each closure (probably needs to clone a window for each iteration). |
Is your feature request related to a problem? Please describe.
I have an async [tauri::command] that includes a Window. This command compiles on Linux, but not compile on Windows. On Windows I get an error that Window is not Send and not Sync.
Describe the solution you'd like
Window object on
Windows
should beSend + Sync
as same on Linux.Additional context
Here is the code that compiles on Linux, but does not compile on Windows
Here are some clips of the compiler errors
[Windows info]
[Linux info]
The text was updated successfully, but these errors were encountered: