Skip to contents

Adds a named backend that run_jobs() can dispatch to. This is how to plug in a custom scheduler driver without modifying fmrireg. The builtins "sequential" and "future" are always available.

Usage

register_run_backend(name, fn, overwrite = FALSE)

Arguments

name

Backend name (a string).

fn

A function function(jobs, run_one, ...) returning an order-preserving list of per-job results.

overwrite

Allow replacing an existing backend of the same name.

Value

The backend name, invisibly.

Examples

register_run_backend("first_only", function(jobs, run_one, ...) {
  list(run_one(jobs[[1]]))
})