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

Flush the merge-wait queue on SIGUSR2 #1406

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Flowdalic
Copy link
Member

If portage receives SIGUSR2, then flush the merge-wait queue on the next possible occasion (typically after all running "install" jobs are finished).

If portage receives SIGUSR2, then flush the merge-wait queue on the
next possible occasion (typically after all running "install" jobs
are finished).

Signed-off-by: Florian Schmaus <[email protected]>
@@ -1193,6 +1199,10 @@ def sighandler(signum, frame):
signal.signal(signal.SIGCONT, earlier_sigcont_handler)
else:
signal.signal(signal.SIGCONT, signal.SIG_DFL)
if earlier_sigusr2_handler is not None:
Copy link
Member

Choose a reason for hiding this comment

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

No need to do this now, but I wonder if we could do bette rwith this with a context manager.

self._merge_wait_queue
and not self._jobs
and not self._task_queues.merge
if self._merge_wait_queue and (
Copy link
Member

Choose a reason for hiding this comment

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

This might be nice as a variable instead.

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