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:
parent
1daaee98aa
commit
020c6b61da
19 changed files with 134 additions and 75 deletions
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue