Learn R Programming

async (version 0.0.0.9004)

is_async: Checks if a function is async

Description

If fun is not a function, an error is thrown.

Usage

is_async(fun)

Arguments

fun

Function.

Value

Logical scalar, whether fun is async.

Details

Currently, it checks for the async attribute, which is set by async().

Examples

Run this code
# NOT RUN {
f <- function(x) 42
af <- async(f)
is_async(f)
is_async(af)
f()
synchronise(dx <- af())
dx
# }

Run the code above in your browser using DataLab