Alias for update(value)
Cancels the unit of work represented by this reference.
Cancels the unit of work represented by this reference.
Guaranteed idempotency - calling it multiple times should have the same side-effect as calling it only a single time. Implementations of this method should also be thread-safe.
true if cancellation happened, or false if another execution happened previously or concurrently.
true in case this cancelable hasn't been canceled.
Swaps the underlying cancelable reference with s
.
Swaps the underlying cancelable reference with s
.
In case this SerialCancelable
is already canceled,
then the reference value
will also be canceled on assignment.
Represents a monifu.concurrent.Cancelable whose underlying cancelable can be swapped for another cancelable which causes the previous underlying cancelable to be canceled.
Example:
Also see MultiAssignmentCancelable, which is similar, but doesn't cancel the old cancelable upon assignment.