You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cancels `task` at any point in its lifecycle, causing the scheduler to abandon
40
-
it. If `force` is `true`, the task will be interrupted with an
41
-
`InterruptException` (not recommended, this is unsafe). If `halt_sch` is
42
-
`true`, the scheduler will be halted after the task is cancelled (it will
43
-
restart automatically upon the next `@spawn`/`spawn` call).
53
+
it.
54
+
55
+
# Keyword arguments
56
+
- `force`: If `true`, the task will be interrupted with an `InterruptException` (not recommended, this is unsafe).
57
+
- `graceful`: If `true`, the task will be allowed to finish its current execution before being cancelled; otherwise, it will be cancelled as soon as possible.
58
+
- `halt_sch`: If `true`, the scheduler will be halted after the task is cancelled (it will restart automatically upon the next `@spawn`/`spawn` call).
44
59
45
60
As an example, the following code will cancel task `t` before it finishes
46
61
executing:
@@ -56,24 +71,24 @@ tasks which are waiting to run. Using `cancel!` is generally a much safer
56
71
alternative to Ctrl+C, as it cooperates with the scheduler and runtime and
0 commit comments