Returned by the apply builder.
Builds an MVar value for F
data types that are either
Concurrent
or Async
.
Builds an MVar value for F
data types that are either
Concurrent
or Async
.
Due to Concurrent
's capabilities, the yielded values by MVar.take
and MVar.put are cancelable. For Async
however this isn't
guaranteed, although the implementation does rely on bracket
,
so it might be.
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].of("hello") <-> MVar.of[IO, String]("hello")
Builds an empty MVar instance.
Builds an MVar instance with an initial
value.