ox.cads.collection

TerminationDetectingPool

class TerminationDetectingPool[T] extends Pool[T]

A wrapper around a partial Pool to give a total Pool.

A call to get will block until either: (1) A value can be returned; (2) All treads are calling get, at which point all return None; or (3) A thread calls signalDone, at which point each call to get returns None.

Linear Supertypes
Pool[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TerminationDetectingPool
  2. Pool
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TerminationDetectingPool(underlying: Pool[T], p: Int)

    underlying

    the underlying Pool

    p

    the number of threads.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def add(x: T, me: Int): Unit

    Add x to the underlying pool.

    Add x to the underlying pool.

    me

    the identitiy of the thread doing the put.

  7. def add(x: T): Unit

    Add x to the underlying pool.

    Add x to the underlying pool.

    Definition Classes
    TerminationDetectingPoolPool
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def get(me: Int): Option[T]

    Try to get from the pool, spinning until either a value is available, or termination is possible.

    Try to get from the pool, spinning until either a value is available, or termination is possible.

    me

    the thread doing the get.

    returns

    Some(x) where x is the value obtained, or None to indicate no value is available.

  14. def get: Option[T]

    Try to get from the pool, trying repeatedly until either a value is available, or because termination is possible.

    Try to get from the pool, trying repeatedly until either a value is available, or because termination is possible.

    returns

    Some(x) where x is the value obtained, or None to indicate no value is available.

    Definition Classes
    TerminationDetectingPoolPool
  15. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def reset: Unit

    Reset the termination object.

  22. def signalDone: Unit

    Force all threads to terminate.

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

    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Pool[T]

Inherited from AnyRef

Inherited from Any

Ungrouped