Karl Forner
2016-Jun-16 16:09 UTC
[Rd] mcparallel (parallel:::mcexit) does not call finalizers
Hello, In the context of trying to cover a package code that use parallelized tests using the covr package, I realized that code executed using mcparallel() was not covered, cf https://github.com/jimhester/covr/issues/189#issuecomment-226492623>From my understanding, it seems that the package finalizer set by covr (cfhttps://github.com/jimhester/covr/blob/79f7e0434f3d14a48c6fea994b67b9814b34e4e5/R/covr.R#L348) is not called, because the forked process exits using parallel:::mcexit, which is a non standard exit and does not call some of the cleanup code (e.g. the R_CleanUp function is not called). I was wondering if a modification of the parallel mcexit could be considered, to make it call the finalizers, possibly triggered by a parameter or an option, or if there are solid reasons not to do so. Regards, Karl Forner [[alternative HTML version deleted]]