TMVar

io.github.timwspence.cats.stm.TMVarLike.TMVar
See theTMVar companion object
final class TMVar[A]

Attributes

Companion:
object
Source:
TMVar.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

Check if currently empty.

Check if currently empty.

Attributes

Source:
TMVar.scala
def put(a: A): Txn[Unit]

Store a value. Retries if the TMVar already contains a value.

Store a value. Retries if the TMVar already contains a value.

Attributes

Source:
TMVar.scala
def read: Txn[A]

Read the current value. Retries if empty.

Read the current value. Retries if empty.

Attributes

Source:
TMVar.scala
def take: Txn[A]

Read the current value and empty it at the same time. Retries if empty.

Read the current value and empty it at the same time. Retries if empty.

Attributes

Source:
TMVar.scala
def tryPut(a: A): Txn[Boolean]

Try to store a value. Returns false if put failed, true otherwise.

Try to store a value. Returns false if put failed, true otherwise.

Attributes

Source:
TMVar.scala
def tryRead: Txn[Option[A]]

Try to read the current value. Returns None if empty, Some(current) otherwise.

Try to read the current value. Returns None if empty, Some(current) otherwise.

Attributes

Source:
TMVar.scala
def tryTake: Txn[Option[A]]

Try to take the current value. Returns None if empty, Some(current) otherwise.

Try to take the current value. Returns None if empty, Some(current) otherwise.

Attributes

Source:
TMVar.scala