2012-11-14 12 views
6

Erlangのプロセススケジューリングは、4つの異なるキューに基づいており、「最高優先度」として指定されています。http://cs.ucsb.edu/~puneet/reports/erlang.pdf(セクション4.4)私はErlangプログラムを持っており、その命令がこのキューに加わるように一つのプロセスを割り当てたいと思います。これを行う方法はありますか?これを行うときに時計がありますか?Erlangでプロセスの優先度を変更できますか?

答えて

7

アーランの文書hereを確認してください。 process_flag(Flag, Option)と呼ばれるBIFがあります。

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. 
+1

ありがとうございました。私はあなたがプロセスをスポーンする直前にこの関数を使用すると思います。それとも、あなたがスポーンする機能に入れますか? – atomh33ls

+0

@ atomh33ls [この質問](http://stackoverflow.com/questions/13381036/what-is-the-correct-use-of-process-flagpriority-level-in-erlang)を参照してください。優先度を外側に変更したい場合は、process_flag/3 – halfelf

関連する問題