review comments

- some API docs
- require names for top-level actors
- allow names for children
- flag error when no channels declared
This commit is contained in:
Roland 2013-01-31 18:59:48 +01:00
parent c362e8168f
commit 86ded1fb0b
9 changed files with 109 additions and 60 deletions

View file

@ -40,7 +40,7 @@ object ChannelDocSpec {
class Parent extends Actor
with Channels[TNil, (Stats, Nothing) :+: (GetChild.type, ChildRef) :+: TNil] {
val child = createChild(new Child)
channel[GetChild.type] { (_, snd) ChildRef(child) -!-> snd }
@ -176,7 +176,7 @@ class ChannelDocSpec extends AkkaSpec {
// type given just for demonstration purposes
val latch: ChannelRef[(Request, Reply) :+: (String, Int) :+: TNil] =
ChannelExt(system).actorOf(new Latch(target))
ChannelExt(system).actorOf(new Latch(target), "latch")
"hello" -!-> latch
//#processing
@ -202,8 +202,8 @@ class ChannelDocSpec extends AkkaSpec {
//
// then it is used somewhat like this:
//
val parent = ChannelExt(system).actorOf(new Parent)
val parent = ChannelExt(system).actorOf(new Parent, "parent")
parent <-!- GetChild
val child = expectMsgType[ChildRef].child // this assumes TestKit context

View file

@ -40,7 +40,7 @@ an error, since the companion object ``Command`` is not an instance of type
While this example looks pretty simple, the implications are profound. In order
to be useful, the system must be as reliable as you would expect a type system
to be. This means that unless you step outside of the it (i.e. doing the
to be. This means that unless you step outside of it (i.e. doing the
equivalent of ``.asInstanceOf[_]``) you shall be protected, failures shall be
recognized and flagged. There are a number of challenges included in this
requirement, which are discussed in the following sections. If you are reading