object MVar
- Alphabetic
- By Inheritance
- MVar
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
class
ApplyBuilders[F[_]] extends AnyVal
Returned by the apply builder.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[F[_]](implicit F: Concurrent[F]): ApplyBuilders[F]
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")
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
empty[F[_], A](implicit F: Concurrent[F]): F[MVar2[F, A]]
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
-
def
emptyIn[F[_], G[_], A](implicit F: Sync[F], G: Concurrent[G]): F[MVar2[G, A]]
Like empty but initializes state using another effect constructor
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
in[F[_], G[_], A](initial: A)(implicit F: Sync[F], G: Concurrent[G]): F[MVar2[G, A]]
Like of but initializes state using another effect constructor
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
of[F[_], A](initial: A)(implicit F: Concurrent[F]): F[MVar2[F, A]]
Creates a cancelable
MVar
that's initialized to aninitial
value.Creates a cancelable
MVar
that's initialized to aninitial
value.- initial
is a value that will be immediately available for the first
read
ortake
operation- F
is a Concurrent constraint, needed in order to describe cancelable operations
- See also
uncancelableOf for non-cancelable MVars
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
uncancelableEmpty[F[_], A](implicit F: Async[F]): F[MVar2[F, A]]
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, makinguncancelable
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 anF[_]
data type that does not support cancellation is used.- See also
empty for creating cancelable MVars
-
def
uncancelableEmptyIn[F[_], G[_], A](implicit F: Sync[F], G: Async[G]): F[MVar2[G, A]]
Like uncancelableEmpty but initializes state using another effect constructor
-
def
uncancelableIn[F[_], G[_], A](initial: A)(implicit F: Sync[F], G: Async[G]): F[MVar2[G, A]]
Like uncancelableOf but initializes state using another effect constructor
-
def
uncancelableOf[F[_], A](initial: A)(implicit F: Async[F]): F[MVar2[F, A]]
Creates a non-cancelable
MVar
that's initialized to aninitial
value.Creates a non-cancelable
MVar
that's initialized to aninitial
value.The resulting
MVar
has non-cancelable operations.WARN: some
Async
data types, like IO, can be cancelable, makinguncancelable
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 anF[_]
data type that does not support cancellation is used.- See also
of for creating cancelable MVars
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
This is the API documentation for the cats-effect library.
See the cats.effect package for a quick overview.
Links
Canonical documentation links:
Related Cats links (the core):