Skip to content

enhance(core): use sync commands for window and webview getters#12162

Draft
Legend-Master wants to merge 7 commits intotauri-apps:devfrom
Legend-Master:remove-getter-command-async
Draft

enhance(core): use sync commands for window and webview getters#12162
Legend-Master wants to merge 7 commits intotauri-apps:devfrom
Legend-Master:remove-getter-command-async

Conversation

@Legend-Master
Copy link
Contributor

Reference: #12032

I don't quite know the reason behined why all window and webview commands are async, seems like for the setters, they would trigger events during the call and causing dead locks, but I can't see any reason for the getters, let me know if this was actually intentional or not

@Legend-Master Legend-Master requested a review from a team as a code owner January 3, 2025 10:38
@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2025

Package Changes Through e89f966

There are 1 changes which include tauri with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri 2.3.1 2.3.2

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@amrbashir
Copy link
Member

I believe we used to have them sync but it caused dead locks somewhere, I think @lucasfernog has more info about this

@lucasfernog
Copy link
Member

I'm pretty sure we'll have deadlocks if we do this :/

@Legend-Master
Copy link
Contributor Author

I'm pretty sure we'll have deadlocks if we do this :/

Do you know any particular places where the deadlock will happen?

If we can't fix them, maybe it's a good idea to document the problem, I have encountered this before trying to call window.center in a sync command and it's quite frustrating trying to debug it

@Legend-Master Legend-Master marked this pull request as draft March 1, 2025 11:51
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 this pull request may close these issues.

3 participants