Skip to content
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

Make DBus calls in async operations async #59

Merged
merged 5 commits into from
Oct 23, 2022
Merged

Make DBus calls in async operations async #59

merged 5 commits into from
Oct 23, 2022

Conversation

pabloyoyoista
Copy link
Collaborator

Async operations run in the main context. Therefore, long blocks in DBus calls can (and do) easily freeze the UI. Fix this by using async DBus calls.

Fixes #44

Add a commit that also fixes #57

The app_dl is a leftover from a previous cleanup

Fixes 7b2fb1e
This avoids synchronously blocking the main thread on an operation
that can be slow and has the potential to freeze the UI.

Relates #44
This avoids blocking on refines, which run very often and can
spontaneously and shortly block the UI.

Relates #44
@pabloyoyoista
Copy link
Collaborator Author

Tested in https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/40531 works well. Opened #60 to track better error handling on upgrades.

@pabloyoyoista pabloyoyoista merged commit 831c949 into master Oct 23, 2022
@pabloyoyoista pabloyoyoista deleted the async branch October 23, 2022 15:13
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.

Failed update can crash GS Switch apk-polkit-rs operations to async
1 participant