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

gaborcsardi/async documentation built on Nov. 20, 2024, 4:51 p.m.