fix up two oversights in previous doc change

- use discardOld=false also in Scala stash sample code
- correct link to UnnestedReceives sample
This commit is contained in:
Roland 2012-11-06 14:15:57 +01:00
parent 4acd483ed3
commit d98c4db1f9
3 changed files with 4 additions and 4 deletions

View file

@ -113,7 +113,7 @@ class ActorDSLSpec extends AkkaSpec {
case "info" sender ! "B"
case "switch" unbecome() // return to the "A" behavior
}
case "lobotomize" => unbecome() // OH NOES: Actor.emptyBehavior
case "lobotomize" unbecome() // OH NOES: Actor.emptyBehavior
}
})
//#becomeStacked

View file

@ -696,7 +696,7 @@ behavior is not the default).
Encoding Scala Actors nested receives without accidentally leaking memory
-------------------------------------------------------------------------
See this `Unnested receive example <@github@/akka-docs/scala/code/docs/actor/UnnestedReceives.scala>`_.
See this `Unnested receive example <@github@/akka-docs/rst/scala/code/docs/actor/UnnestedReceives.scala>`_.
Stash

View file

@ -316,13 +316,13 @@ class ActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
def receive = {
case "open"
unstashAll()
context.become {
context.become({
case "write" // do writing...
case "close"
unstashAll()
context.unbecome()
case msg stash()
}
}, discardOld = false) // stack on top instead of replacing
case msg stash()
}
}