scala - Akka 2.4.6 - where is ask (or ?) method? -


i learning play akka , scala.

the akka documentation says can message actor using ? or ask method. there no ? or ask in actorref class in version of akka using (2.4.6).

was moved somewhere or deprecated?

was moved somewhere or deprecated?

no. ? defined implicit def inside asksupport trait , implicit conversion actorref type:

object askpattern {   implicit class askable[t](val ref: actorref[t]) extends anyval {     def ?[u](f: actorref[u] ⇒ t)(implicit timeout: timeout): future[u] = ask(ref, timeout, f) } 

as can see, implicit works actorref, implicit class accepts 1 argument of said type. means ? method applicable actorref via implicit conversion.

as @sergey notes in comments, in order bring implicit in scope, you'll need import akka.pattern.ask


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -