/// <summary> /// Builds a ProcessId that represents a set of Processes. When used /// for operations like 'tell', the message is dispatched to the Processes in a /// round-robin fashion /// </summary> /// <example> /// tell( Dispatch.roundRobin(pid1,pid2,pid3), "Hello" ); /// </example> public static ProcessId roundRobin(ProcessId processId, params ProcessId[] processIds) => RoundRobin[processId.Cons(processIds)];
/// <summary> /// Builds a ProcessId that represents a set of Processes. When used /// for operations like 'tell', the message is dispatched to the least busy /// Process from the set. /// </summary> /// <example> /// tell( Dispatch.leastBusy(pid1,pid2,pid3), "Hello" ); /// </example> public static ProcessId leastBusy(ProcessId processId, params ProcessId[] processIds) => LeastBusy[processId.Cons(processIds)];
/// <summary> /// Builds a ProcessId that represents a set of Processes. When used /// for operations like 'tell', the message is dispatched to a cryptographically /// random Process from the set. /// </summary> /// <example> /// tell( Dispatch.random(pid1,pid2,pid3), "Hello" ); /// </example> public static ProcessId random(ProcessId processId, params ProcessId[] processIds) => Random[processId.Cons(processIds)];
/// <summary> /// Builds a ProcessId that represents a set of Processes. When used for /// operations like 'tell', the message is dispatched to all Processes in /// the set. /// </summary> /// <example> /// tell( Dispatch.broadcast(pid1,pid2,pid3), "Hello" ); /// </example> public static ProcessId broadcast(ProcessId processId, params ProcessId[] processIds) => Broadcast[processId.Cons(processIds)];