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:
parent
4acd483ed3
commit
d98c4db1f9
3 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue