Cancel one or more tasks
Value
A logical vector the same length as id indicating if the
task was cancelled. This will be FALSE if the task was already
completed, not running, etc.
Examples
cleanup <- hipercow_example_helper()
#> ℹ This example uses a special helper
ids <- c(task_create_expr(Sys.sleep(2)), task_create_expr(runif(1)))
#> ✔ Submitted task '4dce83657c5acf9480687d94f4d9728b' using 'example'
#> ✔ Submitted task 'dd9d610fb8f20a49467998946b8242c9' using 'example'
# The first task may or not be cancelled (depends on if it was
# started already) but the second one will almost certainly be
# cancelled:
task_cancel(ids)
#> ✔ Successfully cancelled 2 tasks
#> [1] TRUE TRUE
cleanup()
#> ℹ Cleaning up example
