molecule.examples.io.choice

SimpleChoice

object SimpleChoice extends ProcessType2x1[Int, Int, Int, Unit]

Alternate reads on two streams of integers.

This process prints only even numbers of one stream and odd numbers of the other stream. Also, the stream with the highest throughput (larger batches) is consumed faster than the stream with the lowest throughput.

The example terminates when both streams have entirely been consumed.

For a less theoretical example of choice, see the stopwatch controller.

Linear Supertypes
ProcessType2x1[Int, Int, Int, Unit], ProcessType[Unit], ProcessType2x1[Int, Int, Int, Unit], (IChan[Int], IChan[Int], OChan[Int]) ⇒ Process2x1[Int, Int, Int, Unit], ProcessType, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SimpleChoice
  2. ProcessType2x1
  3. ProcessType
  4. ProcessType2x1
  5. Function3
  6. ProcessType
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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. final def apply(ichan1: IChan[Int], ichan2: IChan[Int], ochan: OChan[Int]): Process2x1[Int, Int, Int, Unit]

    Definition Classes
    ProcessType2x1 → ProcessType2x1 → Function3
  7. def apply(input1: Input[Int], input2: Input[Int], output: Output[Int]): IO[Process2x1[Int, Int, Int, Unit]]

    Definition Classes
    ProcessType2x1
  8. def apply(ichan1: ⇒ IChan[Int]): ProcessType1x1[Int, Int, Unit]

    Definition Classes
    ProcessType2x1
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def curried: (IChan[Int]) ⇒ (IChan[Int]) ⇒ (OChan[Int]) ⇒ Process2x1[Int, Int, Int, Unit]

    Definition Classes
    Function3
    Annotations
    @unspecialized()
  12. final def eq(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef → Any
  16. def handover(process: Process[Unit]): IO[Nothing]

    Definition Classes
    ProcessType
  17. def handover(process: IO[Process[Unit]]): IO[Nothing]

    Definition Classes
    ProcessType
  18. def hashCode(): Int

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

    Definition Classes
    Any
  20. def main(args: Array[String]): Unit

  21. def main(i1: Input[Int], i2: Input[Int], o1: Output[Int]): IO[Unit]

    Definition Classes
    SimpleChoice → ProcessType2x1
  22. def name: String

    Definition Classes
    ProcessType
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  26. def shutdown(result: Unit): IO[Nothing]

    Attributes
    protected
    Definition Classes
    ProcessType
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

    Definition Classes
    Function3 → AnyRef → Any
  29. def tupled: ((IChan[Int], IChan[Int], OChan[Int])) ⇒ Process2x1[Int, Int, Int, Unit]

    Definition Classes
    Function3
    Annotations
    @unspecialized()
  30. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ProcessType2x1[Int, Int, Int, Unit]

Inherited from ProcessType[Unit]

Inherited from ProcessType2x1[Int, Int, Int, Unit]

Inherited from (IChan[Int], IChan[Int], OChan[Int]) ⇒ Process2x1[Int, Int, Int, Unit]

Inherited from ProcessType

Inherited from AnyRef

Inherited from Any

Ungrouped