status() is a non-blocking S3 generic. On a genproc_result,
it returns one of:
"running" — the underlying future is not yet resolved.
"done" — the future has resolved successfully (the
result is ready to be collected via await()).
"error" — the wrapper future itself crashed. Call
await() to retrieve the error message.
Usage
status(x, ...)
# S3 method for class 'genproc_result'
status(x, ...)
Arguments
- x
An object. Methods exist for genproc_result.
- ...
Unused, for future extensions.
Value
A single character string: "running", "done", or
"error".
Details
For a synchronous (non-nonblocking) result, status() simply
returns result$status ("done" or "error").
status() peeks at the resolved future via future::value()
inside a tryCatch. Because value() consumes the future, the
peek result is cached in a shared environment so that a
subsequent await() does not re-materialize it.