Skip to content

Correctly shutdown synchronize publish task #37

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

Merged
merged 2 commits into from
Mar 1, 2025
Merged

Conversation

Leandros
Copy link
Collaborator

@Leandros Leandros commented Mar 1, 2025

In my preliminary testing, this correctly shuts down the background task.

From looking at the shutdown function; it probably makes sense to apply the same pattern to the background task running bacon. I did not test it with bacon running in the background, because I usually run it in a separate terminal window. The same CancellationToken could be reused.

If I have some time this weekend, I'll see that I can tackle that as well.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 21.21212% with 26 lines in your changes missing coverage. Please review.

Project coverage is 51.40%. Comparing base (596bf2d) to head (f9fd552).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/lib.rs 0.00% 16 Missing ⚠️
src/lsp.rs 0.00% 9 Missing ⚠️
src/bacon.rs 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #37      +/-   ##
==========================================
+ Coverage   51.38%   51.40%   +0.01%     
==========================================
  Files           4        4              
  Lines        1045     1066      +21     
  Branches     1045     1066      +21     
==========================================
+ Hits          537      548      +11     
- Misses        473      483      +10     
  Partials       35       35              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@crisidev
Copy link
Owner

crisidev commented Mar 1, 2025

This looks good and it is a sensible way to fix the issue. I probably have some time later and will pass the cancellation token to the background bacon process as well.

Please run a cargo fmt to make the CI happy and once I am back home I'll merge.

@crisidev
Copy link
Owner

crisidev commented Mar 1, 2025

I'll merge and fix the CI.

@crisidev crisidev merged commit f26c69a into crisidev:main Mar 1, 2025
3 of 4 checks passed
@Leandros
Copy link
Collaborator Author

Leandros commented Mar 1, 2025

@crisidev

I've implemented the bacon shutdown as well. It's in the second commit in the PR. ;)

@crisidev
Copy link
Owner

crisidev commented Mar 1, 2025

Yep, I noticed. Very nice! Thanks

@Leandros Leandros deleted the dev branch March 19, 2025 13:20
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