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

refactor: use context managers whenever to manage resources #185

Merged
merged 11 commits into from
Sep 14, 2024

Conversation

R1kaB3rN
Copy link
Member

@R1kaB3rN R1kaB3rN commented Sep 14, 2024

Tested on SteamOS (3.16.13) and on the latest Steam beta client (1726256783) for regressions.

This PR refactors some code to use context managers whenever possible, so system resources are properly released when the launcher is forcefully killed any time in its lifecycle. In particular, when the launcher is interrupted before the thread pool is shutdown or before the file descriptors of python-xlib objects are closed during the gamescope window setup.

TODO:

  • Sanity check on the Steam Deck

- libc.so is fundamental, so do not even test for this. Users are going to run into problems if it somehow couldn't be found.
@R1kaB3rN R1kaB3rN marked this pull request as ready for review September 14, 2024 08:06
@R1kaB3rN R1kaB3rN merged commit e064439 into Open-Wine-Components:main Sep 14, 2024
5 of 6 checks passed
@R1kaB3rN R1kaB3rN deleted the context-managers branch September 14, 2024 08:07
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