requestCore: Request a core for multicore processing

Description Usage Arguments Value

View source: R/multicore.R

Description

If no cores are available, the current process blocks until a core is available.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
requestCore(
  await,
  workers = availableCores(),
  timeout = getOption("future.wait.timeout",
    as.numeric(Sys.getenv("R_FUTURE_WAIT_TIMEOUT", 30 * 24 * 60 * 60))),
  delta = getOption("future.wait.interval",
    as.numeric(Sys.getenv("R_FUTURE_WAIT_INTERVAL", "0.2"))),
  alpha = getOption("future.wait.alpha", as.numeric(Sys.getenv("R_FUTURE_WAIT_ALPHA",
    "1.01")))
)

Arguments

await

A function used to try to "collect" finished multicore subprocesses.

workers

Total number of workers available.

timeout

Maximum waiting time (in seconds) allowed before a timeout error is generated.

delta

Then base interval (in seconds) to wait between each try.

alpha

A multiplicative factor used to increase the wait interval after each try.

Value

Invisible TRUE. If no cores are available after extensive waiting, then a timeout error is thrown.


future documentation built on Jan. 8, 2021, 5:36 p.m.

Related to requestCore in future...