Object/Class

cats.effect.concurrent

MVar

Related Docs: class MVar | package concurrent

Permalink

object MVar

Builders for MVar.

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

Type Members

  1. final class ApplyBuilders[F[_]] extends AnyVal

    Permalink

    Returned by the apply builder.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[F[_]](implicit F: Concurrent[F]): ApplyBuilders[F]

    Permalink

    Builds an MVar value for F data types that are Concurrent.

    Builds an MVar value for F data types that are Concurrent.

    Due to Concurrent's capabilities, the yielded values by MVar.take and MVar.put are cancelable.

    This builder uses the Partially-Applied Type technique.

    For creating an empty MVar:

    MVar[IO].empty[Int] <-> MVar.empty[IO, Int]

    For creating an MVar with an initial value:

    MVar[IO].init("hello") <-> MVar.init[IO, String]("hello")
    See also

    ofand empty

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def empty[F[_], A](implicit F: Concurrent[F]): F[MVar[F, A]]

    Permalink

    Creates a cancelable MVar that starts as empty.

    Creates a cancelable MVar that starts as empty.

    F

    is a Concurrent constraint, needed in order to describe cancelable operations

    See also

    uncancelableEmpty for non-cancelable MVars

  8. def emptyIn[F[_], G[_], A](implicit F: Sync[F], G: Concurrent[G]): F[MVar[G, A]]

    Permalink

    Like empty but initializes state using another effect constructor

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. def in[F[_], G[_], A](initial: A)(implicit F: Sync[F], G: Concurrent[G]): F[MVar[G, A]]

    Permalink

    Like of but initializes state using another effect constructor

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def of[F[_], A](initial: A)(implicit F: Concurrent[F]): F[MVar[F, A]]

    Permalink

    Creates a cancelable MVar that's initialized to an initial value.

    Creates a cancelable MVar that's initialized to an initial value.

    initial

    is a value that will be immediately available for the first read or take operation

    F

    is a Concurrent constraint, needed in order to describe cancelable operations

    See also

    uncancelableOf for non-cancelable MVars

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. def uncancelableEmpty[F[_], A](implicit F: Async[F]): F[MVar[F, A]]

    Permalink

    Creates a non-cancelable MVar that starts as empty.

    Creates a non-cancelable MVar that starts as empty.

    The resulting MVar has non-cancelable operations.

    WARN: some Async data types, like IO, can be cancelable, making uncancelable values unsafe. Such values are only useful for optimization purposes, in cases where the use case does not require cancellation or in cases in which an F[_] data type that does not support cancellation is used.

    See also

    empty for creating cancelable MVars

  23. def uncancelableEmptyIn[F[_], G[_], A](implicit F: Sync[F], G: Async[G]): F[MVar[G, A]]

    Permalink

    Like uncancelableEmpty but initializes state using another effect constructor

  24. def uncancelableIn[F[_], G[_], A](initial: A)(implicit F: Sync[F], G: Async[G]): F[MVar[G, A]]

    Permalink

    Like uncancelableOf but initializes state using another effect constructor

  25. def uncancelableOf[F[_], A](initial: A)(implicit F: Async[F]): F[MVar[F, A]]

    Permalink

    Creates a non-cancelable MVar that's initialized to an initial value.

    Creates a non-cancelable MVar that's initialized to an initial value.

    The resulting MVar has non-cancelable operations.

    WARN: some Async data types, like IO, can be cancelable, making uncancelable values unsafe. Such values are only useful for optimization purposes, in cases where the use case does not require cancellation or in cases in which an F[_] data type that does not support cancellation is used.

    See also

    of for creating cancelable MVars

  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped