Returns an instance of a BooleanCancelableF that's already canceled.
Builder for BooleanCancelableF that wraps and protects the given cancellation token.
Builder for BooleanCancelableF that wraps and protects the given cancellation token.
The returned implementation guarantees idempotency by
ensuring that the given token
will only be executed once,
the operation becoming a no-op on sub-sequent evaluations,
thus being memoized.
is a value that can be evaluated.
Returns a BooleanCancelableF that can never be canceled.
Returns a BooleanCancelableF that can never be canceled.
Useful as a low-overhead instance whose isCanceled
value
is always false
, thus similar in spirit with alreadyCanceled.
Unsafe version of apply.
Unsafe version of apply.
This function is unsafe because creating the returned BooleanCancelableF allocates internal shared mutable state, thus breaking referential transparency, which can catch users by surprise.