move all Ask stuff to akka.pattern

- remove ?(msg, timeout), should always use ?(msg)(timeout) because of
  Scala’s only Martin-acknowledged design flaw of being able to pass
  tuples into single-arg methods without adding another pair of parens
- put a provider into all actor refs, because they all are created by
  and associated with one
- treat all terminated refs equally: tell(msg) and return broken promise
This commit is contained in:
Roland 2012-01-19 15:13:10 +01:00
parent 1daaee98aa
commit 020c6b61da
19 changed files with 134 additions and 75 deletions

View file

@ -252,7 +252,7 @@ class ActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
//#using-explicit-timeout
import akka.util.duration._
import akka.pattern.ask
val future = myActor ? ("hello", timeout = 500 millis)
val future = myActor.ask("hello")(500 millis)
//#using-explicit-timeout
Await.result(future, 500 millis) must be("hello")
}