Coroutines rely on "pausable" workalikes for control flow functions like if, while, and so on. pausables() scans for and returns a list of all pausable functions visible from the present environment.

pausables(envir = caller(), packages = NULL)

Arguments

envir

The environment to search (defaulting to the calling environment).

packages

By default, will only look for pausable functions visible from the caller's environment. packages argument additionally specifies aditional packages to search. packages=base::.packages() will search all currently loaded packages. [.packages(all.available=TRUE)] will search all installped package.

Value

A list of expressions (either names or ::: calls)

Details

A pausable function is a public function that has a corresponding private function with a name endng with _cps. Most of these private functions are defined in async source file cps.r. For instance, async:::for_cps contains the pausable implementation of for.