# Start a new controller.
x <- crew::crew_controller_local(
workers = 10,
seconds_idle = 30
)
# Submit many parallel tasks.
x$walk(
rnorm(1, x),
iterate = list(x = seq_len(1000))
)
# Optional: wait for all tasks.
x$wait(mode = "all")
# Collect results so far.
str(unlist(x$collect()$result))
#> num [1:1000] 3.2 4.1 2.31 ...