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

UpdateManager: Clean up the weird cancellation token #12129

Merged
merged 5 commits into from
Dec 23, 2023

Conversation

adamPetho
Copy link
Collaborator

Addresses: #12121 (comment)

Previously, the application stopping token (from Global.cs) was sent in, saved and used by this class for reasons I don't know.

Which makes no sense, since the class is disposable and the GC will handle this job.
Therefore a simple CTS is sufficient IMO.

Copy link
Collaborator

@turbolay turbolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8080542
I even asked adam privately to do the same :D

@kiminuo
Copy link
Collaborator

kiminuo commented Dec 22, 2023

@adamPetho I attempted to clean up the implementation a bit more. I believe that it's better to propagate cancellation tokens explicitly (it's a standard in the codebase) and it allows to use linked CTs, etc.

@adamPetho
Copy link
Collaborator Author

Damn, I'm late to my own PR. 😅

Thanks @kiminuo!! The changes looks very good!

@kiminuo kiminuo changed the title UpdateManager: Clean up the weird cancellation token UpdateManager: Clean up the weird cancellation token Dec 23, 2023
@kiminuo kiminuo merged commit a5146e0 into WalletWasabi:master Dec 23, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants