Kill with grace#367
Merged
Merged
Conversation
lionel-
commented
Apr 27, 2023
A single gc() might not trigger the finalizer.
Does not work on Windows.
Because R CMD INSTALL assumes that subdirectories within libs correspond to sub-architectures, and e.g. R CMD INSTALL --libs-only fails.
Use px for a process w/ SIGTERM handler, instead of the extra shared library.
Member
|
Thank you, and sorry for the very long wait! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branched from #366.
Revive the
graceargument in thekill()method. We now first send aSIGTERM, wait for a grace period, and only thenSIGKILLTo avoid a delay of
graceseconds when the process terminates quickly, we poll for termination. This is supported by the same mechanism that is already implemented forwait(). The routine is split into an R-facingprocessx_wait()function and a C-facingc_processx_wait()variant which is called by the kill implementation.The
new()andrun()methods of processes gain acleanup_graceargument that is passed tokill()andkill_tree()on termination.