Processes priorities

Vance Shipley vances@REDACTED
Thu Apr 22 18:57:40 CEST 2004


On Thu, Apr 22, 2004 at 12:11:52PM -0300, Eduardo Figoli wrote:
}  
}  Can Erlang manage priorities between processes?
}  Something like; calls to a process (Pid1) from a group of processes
}  (Pid2, Pid3) have priority under other Pids. 

Do you mean something like this?

   PriorityPids = [Pid2, Pid3],
   ReceivePriority = fun(Pid) ->
         receive
            {Pid, Msg} ->
               do_priority_msg(Msg);
            after 0 ->
               none
         end
   end,
   lists:foreach(ReceivePriority, PriorityPids),


         -Vance



More information about the erlang-questions mailing list