paleolimbot commented on code in PR #13706:
URL: https://github.com/apache/arrow/pull/13706#discussion_r957349438
##########
r/R/arrow-package.R:
##########
@@ -81,6 +81,14 @@
invisible()
}
+.onUnload <- function(...) {
+ # When running valgrind we need to wait for the thread pools to finish
+ # running background tasks or else spurious memory leaks may be reported.
+ if (on_linux_dev()) {
Review Comment:
See below, too, but I'm a little worried that the waiting will unnecessarily
delay a user restarting an R session (e.g., if it's waiting for a GCS read
timeout or something). I'd prefer not to do this at all and have the ExecPlan
properly clean up after itself when `StopProducing()` gets called, but that PR
isn't quite finished yet I think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]