Added parens to unbecome
This commit is contained in:
parent
3c903ca077
commit
1f9d54dced
3 changed files with 5 additions and 5 deletions
|
|
@ -119,7 +119,7 @@ class HotSwapSpec extends WordSpec with MustMatchers {
|
|||
_log += "swapped"
|
||||
barrier.await
|
||||
case "revert" =>
|
||||
unbecome
|
||||
unbecome()
|
||||
})
|
||||
barrier.await
|
||||
}
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ trait Actor {
|
|||
* If "discardOld" is true, an unbecome will be issued prior to pushing the new behavior to the stack
|
||||
*/
|
||||
def become(behavior: Receive, discardOld: Boolean = true) {
|
||||
if (discardOld) unbecome
|
||||
if (discardOld) unbecome()
|
||||
self.hotswap = self.hotswap.push(behavior)
|
||||
}
|
||||
|
||||
|
|
@ -454,7 +454,7 @@ trait Actor {
|
|||
|
||||
private final def autoReceiveMessage(msg: AutoReceivedMessage): Unit = msg match {
|
||||
case HotSwap(code, discardOld) => become(code(self), discardOld)
|
||||
case RevertHotSwap => unbecome
|
||||
case RevertHotSwap => unbecome()
|
||||
case Exit(dead, reason) => self.handleTrapExit(dead, reason)
|
||||
case Link(child) => self.link(child)
|
||||
case Unlink(child) => self.unlink(child)
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ Here is another little cute example of ``become`` and ``unbecome`` in action:
|
|||
become {
|
||||
case Swap =>
|
||||
println("Ho")
|
||||
unbecome // resets the latest 'become' (just for fun)
|
||||
unbecome() // resets the latest 'become' (just for fun)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -511,7 +511,7 @@ Revert the Actor body using the ``unbecome`` method:
|
|||
.. code-block:: scala
|
||||
|
||||
def receive: Receive = {
|
||||
case "revert" => unbecome
|
||||
case "revert" => unbecome()
|
||||
}
|
||||
|
||||
Killing an Actor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue