Learn R Programming

mirai.promises (version 0.5.0)

as.promise.mirai: Make 'Mirai' 'Promise'

Description

Creates a 'promise' from a 'mirai' or 'recvAio'.

Usage

# S3 method for mirai
as.promise(x)

# S3 method for recvAio as.promise(x)

Value

A 'promise' object.

Arguments

x

an object of class 'mirai' or 'recvAio'.

Details

This function is an S3 method for the generic as.promise for class 'mirai' or 'recvAio'.

polling may be used to customise the frequency with which to poll for promise resolution (defaults to every 100 milliseconds).

Examples

Run this code
if (interactive()) {
# Only run examples in interactive R sessions

p <- promises::as.promise(mirai::mirai("example"))
print(p)
promises::is.promise(p)

}

Run the code above in your browser using DataLab