trait FlowTermination[-A] extends AnyRef
FlowTermination[-A] - termination of flow.
Inside each block in select loop or select apply (once or forever) we have implicit FlowTermination entity, which we can use for exiting the loop.
select.forever{ case x: info.read => Console.println(s"received from info $x") case x: control.read => implicitly[FlowTermination[Unit]].doExit(()) }
- Alphabetic
- By Inheritance
- FlowTermination
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
doExit(a: A): A
terminate current flow and leave
a
as result of flow.terminate current flow and leave
a
as result of flow. have no effect if flow is already completed. -
abstract
def
doThrow(e: Throwable): Unit
terminate current flow with exception.
terminate current flow with exception. Mostly used internally.
-
abstract
def
isCompleted: Boolean
check - if flow is completed.
- abstract def throwIfNotCompleted(ex: Throwable): Unit