Packages

object CancelableF

Source
CancelableF.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CancelableF
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Empty[F[_]] extends CancelableF[F] with IsDummy[F]

    Interface for cancelables that are empty or already canceled.

  2. trait IsDummy[F[_]] extends AnyRef

    Marker for cancelables that are dummies that can be ignored.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[F[_]](token: F[Unit])(implicit F: Sync[F]): F[CancelableF[F]]

    Given a token that does not guarantee idempotency, wraps it in a CancelableF value that guarantees the given token will execute only once.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def cancelAll[F[_]](seq: CancelableF[F]*)(implicit F: Sync[F]): CancelToken[F]

    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:

    • for the JVM "Suppressed Exceptions" are used
    • for JS they are wrapped in a CompositeException
  7. def cancelAllTokens[F[_]](seq: CancelToken[F]*)(implicit F: Sync[F]): CancelToken[F]

    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:

    • for the JVM "Suppressed Exceptions" are used
    • for JS they are wrapped in a CompositeException
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def collection[F[_]](refs: CancelableF[F]*)(implicit F: Sync[F]): CancelableF[F]

    Builds a CancelableF reference from a sequence, cancelling everything when cancel gets evaluated.

  10. def empty[F[_]](implicit F: Applicative[F]): CancelableF[F]

    Returns a dummy CancelableF that doesn't do anything.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. def unsafeApply[F[_]](token: F[Unit])(implicit F: Sync[F]): CancelableF[F]

    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.

    Annotations
    @UnsafeBecauseImpure()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. def wrap[F[_]](token: CancelToken[F]): CancelableF[F]

    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.

Inherited from AnyRef

Inherited from Any

Ungrouped