我从http://cs.ucsb.edu/~puneet/reports/erlang.pdf(第4.4节)了解到,Erlang中的进程调度基于4个不同的队列 - 其中一个被指定为"最高优先级".我有一个Erlang程序,我想分配一个进程,以便其指令加入此队列.有没有办法做到这一点?这样做有什么手表吗?
在这里查看Erlang的文档.有一个BIF叫process_flag(Flag, Option).
process_flag(priority, Level)
% This sets the process priority. Level is an atom.
% There are currently four priority levels: low, normal, high, and max.
% The default is normal.
Run Code Online (Sandbox Code Playgroud)