Skip to content

Commit

Permalink
pskill only if unclean shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mschubert committed Apr 22, 2018
1 parent e9d694e commit 3eb35d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/qsys_multicore.r
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ MULTICORE = R6::R6Class("MULTICORE",

cleanup = function() {
success = super$cleanup()
self$finalize(success)
if (success)
private$pids = NULL
self$finalize()
},

finalize = function(clean=FALSE) {
finalize = function() {
if (length(private$pids) > 0) {
tools::pskill(private$pids, tools::SIGKILL)
private$pids = NULL
Expand Down

0 comments on commit 3eb35d5

Please sign in to comment.