Esempio n. 1
0
        private static void Ask(IActor actor, object message, Action <object> responseReceived, TimeSpan timeOut)
        {
            var task   = actor.Ask(message, timeOut);
            var result = task.Result;

            responseReceived(result);
        }
 public static Task <IActorMessage> Ask <T>(this IActor self, T message, out TaskCompletionSource <IActorMessage> cancelToken) where T : class
 {
     return(self.Ask <T>(message, null, out cancelToken));
 }
        public static Task <IActorMessage> Ask <T>(this IActor self, T message, TimeSpan?timeout) where T : class
        {
            TaskCompletionSource <IActorMessage> dummyToken;

            return(self.Ask <T>(message, timeout, out dummyToken));
        }