-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use garbage collection in persistent scheduling #429
Conversation
Codecov Report
@@ Coverage Diff @@
## master #429 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 66 66
Lines 5362 5363 +1
=====================================
+ Hits 5362 5363 +1
Continue to review full report at Codecov.
|
R/mclapply.R
Outdated
@@ -69,6 +72,7 @@ mc_master <- function(config){ | |||
} | |||
|
|||
mc_worker <- function(worker, config){ | |||
on.exit(gc()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we'd substitute Sys.sleep()
in line 80 with gc()
a few times. (I'm not sure if a second, third ... gc()
will free even more memory.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this fixes #428. Merging now. Let's keep discussing. |
Thanks. I'll test the new behavior soon. |
Summary
Call
gc()
on exit for persistent workers and the master process. cc @krlmlr.Related GitHub issues
Checklist
drake
's code of conduct, and I agree to follow its rules.testthat
unit tests totests/testthat
to confirm that any new features or functionality work correctly.devtools::check()