diff --git a/R/ping.R b/R/ping.R index 0a37610..a605a5a 100644 --- a/R/ping.R +++ b/R/ping.R @@ -125,7 +125,9 @@ ping.peers <- function(bitmonero.dir = "~/.bitmonero", output.file = "monero_pee if (nrow(peers) * ping.count > 5) { if (is.null(threads)) { - n.workers <- min(c(floor(nrow(peers) * ping.count / 5), parallelly::availableCores()*4)) + n.workers <- min(c(floor(nrow(peers) * ping.count / 5), parallelly::availableCores()*4, 100) + } else { + n.workers <- threads } options(parallelly.maxWorkers.localhost = 4) # This means number of CPU cores times 4 # Most time in thread is waiting for ping to return, so can have