예제 #1
0
        public ISimpleScheduler ScheduleRequestOnce(TimeSpan delay, PID sender, PID target, object message)
        {
            Task.Run(async() =>
            {
                await Task.Delay(delay);

                //TODO: allow custom sender
                _context.Request(target, message);
            });

            return(this);
        }
예제 #2
0
 public void Request(PID target, object message, PID?sender) => _context.Request(target, message, sender);
예제 #3
0
 /// <summary>
 ///     Sends a message together with a Sender PID, this allows the target to respond async to the Sender
 /// </summary>
 /// <param name="target">The target PID</param>
 /// <param name="message">The message to send</param>
 public static void Request(this ISenderContext self, PID target, object message) =>
 self.Request(target, message, self.Self);