=act #3572 Add parens to sender

* because it is not referentially transparent; normally we reserved parens for
  side-effecting code but given how people thoughtlessly close over it we revised
  that that decision for sender
* caller can still omit parens
This commit is contained in:
Patrik Nordwall 2014-01-16 15:16:35 +01:00
parent 537840bd2a
commit a11fb1dafc
202 changed files with 631 additions and 620 deletions

View file

@ -36,9 +36,9 @@ class DangerousActor extends Actor with ActorLogging {
def receive = {
case "is my middle name" =>
breaker.withCircuitBreaker(Future(dangerousCall)) pipeTo sender
breaker.withCircuitBreaker(Future(dangerousCall)) pipeTo sender()
case "block for me" =>
sender ! breaker.withSyncCircuitBreaker(dangerousCall)
sender() ! breaker.withSyncCircuitBreaker(dangerousCall)
}
//#circuit-breaker-usage