Skip to content

Commit

Permalink
don't wait for thread pools unless on valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Aug 2, 2022
1 parent d38781f commit aa429ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion r/R/arrow-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@
}

.onUnload <- function(...) {
WaitForIdleThreadPool()
# When running valgrind we need to wait for the thread pools to finish
# running background tasks or else we may get spurious memory leaks reported.
if (on_linux_dev()) {
WaitForIdleThreadPool()
}
}

configure_tzdb <- function() {
Expand Down

0 comments on commit aa429ab

Please sign in to comment.