Packages

final class MultiAssignmentCancelable extends Multi

Represents a monix.execution.Cancelable whose underlying cancelable reference can be swapped for another.

Example:

val s = MultiAssignmentCancelable()
s := c1 // sets the underlying cancelable to c1
s := c2 // swaps the underlying cancelable to c2

s.cancel() // also cancels c2

s := c3 // also cancels c3, because s is already canceled

Also see SerialCancelable, which is similar, except that it cancels the old cancelable upon assigning a new cancelable.

Source
MultiAssignmentCancelable.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MultiAssignmentCancelable
  2. Multi
  3. Bool
  4. BooleanCancelable
  5. AssignableCancelable
  6. Cancelable
  7. Serializable
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def :=(value: Cancelable): MultiAssignmentCancelable.this.type

    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 assignment as well.

    returns

    this

    Definition Classes
    MultiAssignmentCancelableAssignableCancelable
    Annotations
    @tailrec()
  2. def cancel(): Unit

    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 once. Implementations of this method should also be thread-safe.

    Definition Classes
    MultiAssignmentCancelableCancelable
  3. def isCanceled: Boolean

    returns

    true in case this cancelable hasn't been canceled, or false otherwise.

    Definition Classes
    MultiAssignmentCancelableBooleanCancelable
  4. def orderedUpdate(value: Cancelable, order: Long): MultiAssignmentCancelable.this.type

    An ordered update is an update with an order attached and if the currently stored reference has on order that is greater than the update, then the update is ignored.

    An ordered update is an update with an order attached and if the currently stored reference has on order that is greater than the update, then the update is ignored.

    Definition Classes
    MultiAssignmentCancelableMulti
    Annotations
    @tailrec()