scalation.coroutine

Scheduler

trait Scheduler extends Coroutine

This Scheduler trait provides an interface for coroutine schedulers.

Linear Supertypes
Coroutine, Ordered[Coroutine], Comparable[Coroutine], PQItem, Identifiable, Error, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Scheduler
  2. Coroutine
  3. Ordered
  4. Comparable
  5. PQItem
  6. Identifiable
  7. Error
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def reschedule(coroutine: Coroutine): Unit

    Schedule (first time) or reschedule (subsequent times) a coroutine to execute.

    Schedule (first time) or reschedule (subsequent times) a coroutine to execute.

    coroutine

    the coroutine to be scheduled

  2. abstract def run(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    When an an instance of a class that mixes in Couroutine, starting the coroutine causes the run function to be called.

    When an an instance of a class that mixes in Couroutine, starting the coroutine causes the run function to be called. The general contract among all coroutines is that only the run function one coroutine can be executing at any given time.

    Definition Classes
    Coroutine

Concrete 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. def <(that: Coroutine): Boolean

    Definition Classes
    Ordered
  5. def <=(that: Coroutine): Boolean

    Definition Classes
    Ordered
  6. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  8. def >(that: Coroutine): Boolean

    Definition Classes
    Ordered
  9. def >=(that: Coroutine): Boolean

    Definition Classes
    Ordered
  10. var _clock: Double

    The clock that keep track of the current scheduling time.

    The clock that keep track of the current scheduling time.

    Attributes
    protected
  11. var _current: Coroutine

    The currently executing coroutine (execute one at a time).

    The currently executing coroutine (execute one at a time).

    Attributes
    protected
  12. var actTime: Double

    The activation time for the item in the time-ordered priority queue

    The activation time for the item in the time-ordered priority queue

    Definition Classes
    PQItem
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. final def clock(): Double

    The current value of the Scheduler's clock.

  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def compare(other: Coroutine): Int

    Compare the activation times of the two coroutines.

    Compare the activation times of the two coroutines.

    Definition Classes
    Coroutine → Ordered
  17. def compare(other: PQItem): Int

    Compare two items (PQItems) based on their actTime.

    Compare two items (PQItems) based on their actTime.

    other

    the other item to compare with this item

    Definition Classes
    PQItem
  18. def compareTo(that: Coroutine): Int

    Definition Classes
    Ordered → Comparable
  19. final def end(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    Terminates the coroutine, regardless of state.

    Terminates the coroutine, regardless of state.

    Definition Classes
    Coroutine
  20. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  24. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  26. def id: Int

    Get the id (unique identifier).

    Get the id (unique identifier).

    Definition Classes
    Identifiable
  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def me: String

    Return the full identity.

    Return the full identity.

    Definition Classes
    Identifiable
  29. def name: String

    Get the name.

    Get the name.

    Definition Classes
    Identifiable
  30. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  33. final def pause(delay: Int, scheduler: Scheduler = Coroutine.defaultScheduler): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    If the coroutine is running, suspends the coroutine for a certain amount of time.

    If the coroutine is running, suspends the coroutine for a certain amount of time. If the coroutine is suspended, then begin execution again after a certain amount of time. Time units depend on the coroutine scheduler. If no coroutine scheduler is provided then the default, Coroutine.defaultScheduler, is used.

    delay

    time delay before the coroutine is resumed

    scheduler

    the coroutine scheduler

    Definition Classes
    Coroutine
  34. def postRun(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    When the coroutine is finished executing its run function, this function is executed.

    When the coroutine is finished executing its run function, this function is executed.

    Definition Classes
    Coroutine
  35. def preRun(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    When the coroutine is started, this function is executed before the run function.

    When the coroutine is started, this function is executed before the run function.

    Definition Classes
    Coroutine
  36. final def restart(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    Causes this coroutine to restart execution.

    Causes this coroutine to restart execution. If another coroutine is currently being executed, then that coroutine is suspended before this one is executed. If this coroutine has not already been started, then this has the same effect as the run function. It is important to note that the state from any previous execution of this coroutine is not saved.

    Definition Classes
    Coroutine
  37. final def resume(): Unit

    If the coroutine is suspended, it is resumed and continues its execution.

    If the coroutine is suspended, it is resumed and continues its execution.

    If the coroutine is in some other state, the behavior of this function is to be treated as undefined.

    Definition Classes
    Coroutine
  38. def setName(label: String): Unit

    Set the name.

    Set the name.

    label

    the name to assign

    Definition Classes
    Identifiable
  39. def simType: String

    Get the type of the simulation object.

    Get the type of the simulation object.

    Definition Classes
    Identifiable
  40. final def start(): Unit

    Causes this coroutine to begin execution.

    Causes this coroutine to begin execution. If another coroutine is currently being executed, then that coroutine is suspended before this one is executed. If this coroutine has already been started, then this has the same effect as the restart function.

    Definition Classes
    Coroutine
  41. def state(): State

    Current state of the coroutine.

    Current state of the coroutine.

    Definition Classes
    Coroutine
  42. final def suspend(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    If the coroutine is running, it is suspended and makes no further progress unless and until it is resumed.

    If the coroutine is running, it is suspended and makes no further progress unless and until it is resumed.

    If the coroutine is in some other state, the behavior of this function is to be treated as undefined.

    Definition Classes
    Coroutine
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def toString(): String

    Convert the item (PQItem) to a string.

    Convert the item (PQItem) to a string.

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def yieldToCoroutine(coroutine: Coroutine): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    If the coroutine is running, suspend execution indefinitely and yield to another coroutine.

    If the coroutine is running, suspend execution indefinitely and yield to another coroutine. If the other coroutine has never been started, then it is started.

    If the coroutine is in some other state, the behavior of this function is to be treated as undefined.

    coroutine

    the coroutine to yield to

    Definition Classes
    Coroutine

Inherited from Coroutine

Inherited from Ordered[Coroutine]

Inherited from Comparable[Coroutine]

Inherited from PQItem

Inherited from Identifiable

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped