result of CloseChannelRead, return number of elements left to read
this is message wich send to ChannelActor, when we know, that channel is closed.
this is message wich send to ChannelActor, when we know, that channel is closed. In such case, we don't konw: is actor stopped or not, So, we say this message (instead read) and wait for reply. If reply is not received within given timeout: think that channel is-dead.
read A and compute B as result.
write A and compute B as result
represent continuated computation from A to B.
Builder for 'forever' selector.
Builder for 'forever' selector. Can be obtained as gopherApi.select.forever
.
Future[A], represented as input which produce a value when completed, after this closes.
Future[A], represented as input which produce a value when completed, after this closes. If evaluation of feature is unsuccessful (i.e. failure), than appropriative exception is thrown during reading.
Can be obtained from gopherApi.
import gopherApi._ val myInput = futureInput(future) select.forever{ case x: myInput.read => Console.println(s"we receive value from future: ${x}") implicitly[FlowTermination[Unit]].doExit(()) case x: myChannel.read => Console.println(s"value from channel: ${x}") }
Also it is possiblt to direclty read from future in case guard:
select.forever{ case x: T if (x==future.read) => Console.println(s"we receive value from future: ${x}") case x: T if (x==channel.read) => Console.println(s"value from channel: ${x}") }
Entity, from which we can read objects of type A.
Builder for 'once' selector.
Builder for 'once' selector. Can be obtained as gopherApi.select.once
.
Input, which combine two other inputs.
Input, which combine two other inputs.
can be created with '|' operator.
val x = read(x|y)
Entity, where we can write objects of type A.
Factory for select instantiation.
Factory for select instantiation. Can be obtained via gopherAPI
val selector = gopherApi.select.forever for(s <- selector) ...
skip (i.e.
skip (i.e. do some operation not related to reading or writing.)
this message is send, when all references to some instance of this channel are unreachable, so if we have no other instances (i.e.
this message is send, when all references to some instance of this channel are unreachable, so if we have no other instances (i.e. remote channel incarnation), than we must destroy channel.
this message is send, when we create new remote reference to channel, backed by this actor.
never means the end of conversation
Overview
Internals
Core entity is Continuated which provide iteratee-like structure for reading and writing. Instance of Continuated represent one step of computations and leave in queue inside ChannelProcessor or ChannelActor Selector transform Continuated to executed exclusive with each other within one selector. Also we have IdleDetector which determinate idle selectors and activer appropriative actions.