Updates the internal reference of this assignable cancelable to the given value.
Updates the internal reference of this assignable cancelable to the given value.
If this cancelable is already canceled, then value
is
going to be canceled on assigned as well.
this
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, or false otherwise.
Represents a class of cancelables that can hold an internal reference to another cancelable (and thus has to support the assignment operator).
Examples are the MultiAssignmentCancelable and the SingleAssignmentCancelable.
NOTE that on assignment, if this cancelable is already canceled, then no assignment should happen and the update reference should be canceled as well.