【发布时间】:2012-02-24 00:02:16
【问题描述】:
在阅读 github 的 Project gproc 的源代码文件“gproc_lib.erl”时,我遇到了一些问题。 我在哪里可以找到该语句语法的相关参考文档?
check_option_f(ets_options) -> fun check_ets_option/1; **%<----**What's the meaning of this** statement**?
check_option_f(server_options) -> fun check_server_option/1.
check_ets_option({read_concurrency , B}) -> is_boolean(B);
check_ets_option({write_concurrency, B}) -> is_boolean(B);
check_ets_option(_) -> false.
check_server_option({priority, P}) ->
%% Forbid setting priority to 'low' since that would
%% surely cause problems. Unsure about 'max'...
lists:member(P, [normal, high, max]);
check_server_option(_) ->
%% assume it's a valid spawn option
true.
【问题讨论】:
标签: erlang