is_async: Checks if a function is async

is_asyncR Documentation

Checks if a function is async

Description

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

Usage

is_async(fun)

Arguments

fun

Function.

Details

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

Value

Logical scalar, whether fun is async.

Examples

f <- function(x) 42
af <- async(f)
is_async(f)
is_async(af)
f()
synchronise(dx <- af())
dx

r-lib/async documentation built on Nov. 19, 2024, 12:08 p.m.