Packages

abstract class Coroutine extends Runnable with Error

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.

Linear Supertypes
Error, Runnable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Coroutine
  2. Error
  3. Runnable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
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. def counts: (Int, Int, Int)

    Return the Coroutine counts.

  2. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  3. def interrupt(): Unit

    Interrupt this waiting coroutine.

  4. 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
  5. def start(): Future[_]

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

    Start this coroutine, i.e., invoke its 'run' -> 'act' method. This function returns a future.

  6. 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)