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

Fix terminating watch_pid task #155

Merged
merged 2 commits into from
Nov 24, 2023
Merged

Fix terminating watch_pid task #155

merged 2 commits into from
Nov 24, 2023

Conversation

poszu
Copy link
Collaborator

@poszu poszu commented Nov 24, 2023

The blocking task watching PID did not terminate when the service closed. Tokio cannot terminate a blocking task by itself - it needs to be signalled to do so.

Added a one-shot termination channel that is passed to the blocking task. The task terminates when the channel is closed or it is sent any value.

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e839186) 93.88% compared to head (8f7050d) 93.88%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #155   +/-   ##
=======================================
  Coverage   93.88%   93.88%           
=======================================
  Files          24       24           
  Lines        3009     3009           
=======================================
  Hits         2825     2825           
  Misses        184      184           

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

@fasmat
Copy link
Member

fasmat commented Nov 24, 2023

I built it locally and tested it in spacemeshos/go-spacemesh#5300. It seems to work for linux, for Windows we need spacemeshos/post#249.

@poszu poszu enabled auto-merge November 24, 2023 13:12
@poszu poszu merged commit e5d891f into main Nov 24, 2023
20 checks passed
@fasmat fasmat deleted the fix-watch-pid-termination branch November 24, 2023 13:35
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.

2 participants