Std.Concurrent.Cancel
13 public declarations
- cancel
&Std.Concurrent.Cancel.Token -> Str -> Result[(), Std.Sync.SyncError]Ask the work holding this token, and every child of it, to stop.
- check
&Std.Concurrent.Cancel.Token -> Result[(), Std.Concurrent.Cancel.Reason]Okwhile the token has not fired, so work can stop with?. - child
&Std.Concurrent.Cancel.Token -> Std.Concurrent.Cancel.TokenA token that fires when its parent does.
- childExpiring
&Std.Concurrent.Cancel.Token -> Int -> Std.Concurrent.Cancel.TokenA child that also fires
millisfrom now, or at its parent's deadline if - expiring
Int -> Std.Concurrent.Cancel.TokenA token that fires by itself
millisfrom now. - explain
&Std.Concurrent.Cancel.Reason -> StrA sentence saying why work stopped.
- pause
&Std.Concurrent.Cancel.Token -> Int -> Result[(), Std.Concurrent.Cancel.Reason]Sleep for
millis, or until the token fires, whichever comes first. - reason
&Std.Concurrent.Cancel.Token -> Option[Std.Concurrent.Cancel.Reason]Why the token fired, or
Nonewhile it has not. An ancestor's reason is - Reason
Why work was asked to stop.
- remaining
&Std.Concurrent.Cancel.Token -> Option[Int]Milliseconds left before the deadline, never below zero, or
Nonefor a - stopped
&Std.Concurrent.Cancel.Token -> BoolWhether the token has fired.
- token
Std.Concurrent.Cancel.TokenA token that fires only when cancelled.
- Token
A request to stop, which work checks between steps.
