diff --git a/R/mclapply.R b/R/mclapply.R index 8c22e8467..6a504434e 100644 --- a/R/mclapply.R +++ b/R/mclapply.R @@ -73,6 +73,7 @@ mc_worker <- function(worker, config){ done_queue <- mc_get_done_queue(worker, config) while (TRUE){ while (nrow(msg <- ready_queue$list(1)) < 1){ + gc() Sys.sleep(mc_wait) } if (identical(msg$message, "done")){