From karl.forner at gmail.com  Thu Jun 16 18:09:53 2016
From: karl.forner at gmail.com (Karl Forner)
Date: Thu, 16 Jun 2016 18:09:53 +0200
Subject: [Rd] mcparallel (parallel:::mcexit) does not call finalizers
Message-ID: <CAMd4_Ae42V+4BmbD3xh6YP_0yA7Ox4nqd1USFZEqO6eHA0SZvw@mail.gmail.com>

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 (cf
https://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]]



[Rd] mcparallel (parallel:::mcexit) does not call finalizers
Karl Forner