future.batchtools (version 0.8.0)

await.BatchtoolsFuture: Awaits the value of a batchtools future

Description

Awaits the value of a batchtools future

Usage

# S3 method for BatchtoolsFuture
await(future, cleanup = TRUE,
  timeout = getOption("future.wait.timeout", 30 * 24 * 60 * 60),
  delta = getOption("future.wait.interval", 1),
  alpha = getOption("future.wait.alpha", 1.01), ...)

Arguments

future

The future.

cleanup

If TRUE, the registry is completely removed upon success, otherwise not.

timeout

Total time (in seconds) waiting before generating an error.

delta

The number of seconds to wait between each poll.

alpha

A factor to scale up the waiting time in each iteration such that the waiting time in the k:th iteration is alpha ^ k * delta.

Not used.

Value

The value of the evaluated expression. If an error occurs, an informative Exception is thrown.

Details

Note that await() should only be called once, because after being called the actual asynchronous future may be removed and will no longer available in subsequent calls. If called again, an error may be thrown.