Created
February 13, 2015 11:45
-
-
Save ktoso/ea102aafdadf1779f4ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Fair { | |
| final case class Ports[T]() extends FlexiPorts[T](name = "Fair") { | |
| val input1 = createInputPort[T]() | |
| val input2 = createInputPort[T]() | |
| } | |
| final case class Logic[T]() extends FlexiMerge[T, Ports[T]](Ports()) { | |
| val readAny = State[T](ReadAny(ports.input1, ports.input2)) { (ctx, input, element) ⇒ | |
| ctx.emit(element) | |
| SameState | |
| } | |
| override def initialState = readAny | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment