scalation.process

Coroutine

Related Docs: object Coroutine | package process

abstract class Coroutine extends Runnable

The Coroutine class supports (one-at-a-time) quasi-concurrent programming. A coroutine runs/acts until it yields control from 'this' to 'that' coroutine. When resumed, a coroutines continues its execution where it left off. When a coroutine finishes, it may be terminated or zombified, in which case it may be restarted.

Linear Supertypes
Runnable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Coroutine
  2. Runnable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Coroutine(label: String = "cor")

Abstract Value Members

  1. abstract def act(): Unit

    Actor model features the 'act' method, even though threads are used.

    Actor model features the 'act' method, even though threads are used. This abstract method must be implemented in application models.

Concrete Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def counts: (Int, Int, Int)

    Return the Coroutine counts.

  7. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

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

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

    Interrupt this waiting zombie coroutine.

  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. def isZombie: Boolean

    Return whether this coroutine is a zombie.

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

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

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

    Definition Classes
    AnyRef
  18. def run(): Unit

    Thread's 'run' method delegates to the 'act' method.

    Thread's 'run' method delegates to the 'act' method. Upon interruption the 'act' method is run again from the beginning.

    Definition Classes
    Coroutine → Runnable
  19. def start(): Unit

    Start this coroutine, i.e., invoke its 'run' -> 'act' method.

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

    Definition Classes
    AnyRef
  21. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def yyield(that: Coroutine, quit: Boolean = false): Unit

    Yield control from 'this' to 'that' coroutine.

    Yield control from 'this' to 'that' coroutine.

    that

    the other coroutine to yield control to

    quit

    whether 'this' coroutine is to terminate (true) or wait to be resumed (false)

  26. def zombify(): Unit

    Zombify this coroutine.

Inherited from Runnable

Inherited from AnyRef

Inherited from Any

Ungrouped