Interface for cancelables that are empty or already canceled.
Marker for cancelables that are dummies that can be ignored.
Given a token that does not guarantee idempotency, wraps it in a CancelableF value that guarantees the given token will execute only once.
Given a collection of cancelables, creates a token that on evaluation will cancel them all.
Given a collection of cancelables, creates a token that on evaluation will cancel them all.
This function collects non-fatal exceptions and throws them all at the end as a composite, in a platform specific way:
CompositeException
Given a collection of cancel tokens, creates a token that on evaluation will cancel them all.
Given a collection of cancel tokens, creates a token that on evaluation will cancel them all.
This function collects non-fatal exceptions and throws them all at the end as a composite, in a platform specific way:
CompositeException
Builds a CancelableF reference from a sequence,
cancelling everything when cancel
gets evaluated.
Returns a dummy CancelableF that doesn't do anything.
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.
Wraps a cancellation token into a CancelableF instance.
Wraps a cancellation token into a CancelableF instance.
Compared with apply the returned value does not guarantee idempotency.
N.B. the returned result is as pure as the wrapped result.
Since we aren't allocating mutable internal state for creating
this value, we don't need to return the value in F[_]
,
like in apply.