Bioconductor / BiocParallel

Bioconductor facilities for parallel evaluation
https://bioconductor.org/packages/BiocParallel
65 stars 29 forks source link

Fix issue 234 #235

Closed Jiefei-Wang closed 1 year ago

Jiefei-Wang commented 1 year ago

Recover the replaced variables in the global environment after the worker finishes its job. Fix issue https://github.com/Bioconductor/BiocParallel/issues/234

DarwinAwardWinner commented 1 year ago

As a minor optimization, you could probably skip the on.exit if replaced_variables is empty.

Jiefei-Wang commented 1 year ago

Thanks for your feedback. The main purpose of the on.exit function is to do a cleanup at the end of the execution, so the on.exit function must be used no matter if replaced_variables is empty or not...