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

Propagate signals from worker to its children #447

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Kobzol
Copy link
Collaborator

@Kobzol Kobzol commented Jun 24, 2022

This is an alternative to #446.

Instead of using DEATHSIG, we create a background handler in the worker which propagates any received SIGTERM, SIGINT or SIGHUP signals to the worker children (=running tasks).

Advantages:

  • Doesn't suffer from the performance regression caused by setting DEATHSIG.
  • Propagates signals to the whole process group, which isn't done by DEATHSIG (that only handles the end of the parent process).

Disadvantages:

  • A bit hacky (?).
  • Doesn't handle SIGKILL.

Fixes: #416
Fixes: #431

@Kobzol Kobzol requested a review from spirali June 24, 2022 13:57
@Kobzol Kobzol marked this pull request as ready for review July 25, 2022 11:29
@Kobzol Kobzol force-pushed the worker-kill-task-lifetime-2 branch from aa39775 to 7fffcf3 Compare July 25, 2022 11:47
@Kobzol Kobzol enabled auto-merge (rebase) July 25, 2022 11:48
@Kobzol Kobzol added this to the v0.12 milestone Jul 25, 2022
@Kobzol Kobzol disabled auto-merge July 25, 2022 15:38
@Kobzol Kobzol marked this pull request as draft July 25, 2022 15:38
@Kobzol Kobzol modified the milestones: v0.12, v0.13 Sep 30, 2022
@Kobzol Kobzol force-pushed the main branch 5 times, most recently from 5de53cd to 4f5c720 Compare September 30, 2022 15:21
@Kobzol Kobzol removed this from the v0.13 milestone Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant