Class

scala.concurrent

SyncVar

Related Doc: package concurrent

Permalink

class SyncVar[A] extends AnyRef

A class to provide safe concurrent access to a mutable cell. All methods are synchronized.

A

type of the contained value

Version

1.0, 10/03/2003

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

Instance Constructors

  1. new SyncVar()

    Permalink

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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def get(timeout: Long): Option[A]

    Permalink

    Waits for this SyncVar to become defined at least for timeout milliseconds (possibly more), and gets its value.

    Waits for this SyncVar to become defined at least for timeout milliseconds (possibly more), and gets its value.

    timeout

    the amount of milliseconds to wait, 0 means forever

    returns

    None if variable is undefined after timeout, Some(value) otherwise

  10. def get: A

    Permalink

    Waits for this SyncVar to become defined and returns the result, without modifying the stored value.

    Waits for this SyncVar to become defined and returns the result, without modifying the stored value.

    returns

    value that is held in this container

  11. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def isSet: Boolean

    Permalink

    Checks whether a value is stored in the synchronized variable

  15. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  18. def put(x: A): Unit

    Permalink

    Places a value in the SyncVar.

    Places a value in the SyncVar. If the SyncVar already has a stored value, it waits until another thread takes it

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

    Permalink
    Definition Classes
    AnyRef
  20. def take(timeout: Long): A

    Permalink

    Waits for this SyncVar to become defined at least for timeout milliseconds (possibly more), and takes its value by first reading and then removing the value from the SyncVar.

    Waits for this SyncVar to become defined at least for timeout milliseconds (possibly more), and takes its value by first reading and then removing the value from the SyncVar.

    timeout

    the amount of milliseconds to wait, 0 means forever

    returns

    the value or a throws an exception if the timeout occurs

    Exceptions thrown

    NoSuchElementException on timeout

  21. def take(): A

    Permalink

    Waits for this SyncVar to become defined and returns the result, unsetting the stored value before returning.

    Waits for this SyncVar to become defined and returns the result, unsetting the stored value before returning.

    returns

    value that was held in this container

  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

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

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

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

Deprecated Value Members

  1. def set(x: A): Unit

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use put instead, as set is potentially error-prone

  2. def unset(): Unit

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use take instead, as unset is potentially error-prone

Inherited from AnyRef

Inherited from Any

Ungrouped