Skip to content

CI: Use libMainThreadChecker to test if all functions run on the correct thread #418

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pentamassiv
Copy link
Collaborator

Xcode provides a tool called the “Main Thread Checker” which verifies that UI APIs are being used from the correct thread. More information can be found here: https://developer.apple.com/documentation/xcode/diagnosing-memory-thread-and-crash-issues-early#Detect-improper-UI-updates-on-background-threads

Tauri crashes when enigo is not used on the main thread. With this tool, we can make sure everything runs on the correct thread

…ect thread

Xcode provides a tool called the “Main Thread Checker” which verifies that UI APIs are being used from the correct thread
@pentamassiv pentamassiv force-pushed the ci_macos_main_thread branch from 274306f to f3fa6a3 Compare March 26, 2025 00:58
@pentamassiv pentamassiv marked this pull request as draft March 26, 2025 11:05
@pentamassiv
Copy link
Collaborator Author

pentamassiv commented Mar 26, 2025

I think there should be warnings. I thought that the tests run in individual threads. It might be a good idea to add a Tauri example and make sure it doesn't crash even if enigo is used in a new thread (see tauri-apps/tauri#6421 (comment))

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.

1 participant