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); }
public void Request(PID target, object message, PID?sender) => _context.Request(target, message, sender);
/// <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);