TMVar

final class TMVar[A]
Companion:
object
Source:
TMVar.scala
class Object
trait Matchable
class Any

Value members

Concrete methods

Check if currently empty.

Check if currently empty.

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.

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

Read the current value. Retries if empty.

Read the current value. Retries if empty.

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.

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.

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.

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.

Source:
TMVar.scala