Skip to content
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

44 force garbage collection after each task loop #45

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: checked
Title: Systematically Run R CMD Checks
Version: 0.2.3.9004
Version: 0.2.3.9005
Authors@R:
c(
person(
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

* Prettify output by stripping excessive new lines.

* Force garbage collection before scheduling task, to make sure any already
finished processes are removed from the memory.

# checked 0.2.3

* Use custom `checked` `finisher`'s instead of the `processx` `finalizer`'s
Expand Down
3 changes: 3 additions & 0 deletions R/check_design.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ check_design <- R6::R6Class( # nolint cyclocomp_linter
if (self$is_done()) {
return(-1L)
}

# force garbage collection to free memory from terminated processes
gc(verbose = FALSE, reset = FALSE, full = TRUE)

# if all available processes are in use, terminate early
n_active <- length(private$active)
Expand Down
Loading