read_concurrency
This commit is contained in:
parent
aee3d3b3f9
commit
1a81a4cc68
|
@ -141,7 +141,7 @@ stop() ->
|
|||
%%% gen_server callbacks.
|
||||
%%%=============================================================================
|
||||
init([AclMods]) ->
|
||||
ets:new(?ACL_TABLE, [set, protected, named_table]),
|
||||
ets:new(?ACL_TABLE, [set, protected, named_table, {read_concurrency, true}]),
|
||||
AclMods1 = lists:map(
|
||||
fun({M, Opts}) ->
|
||||
AclMod = aclmod(M),
|
||||
|
|
|
@ -60,7 +60,7 @@ all_rules() ->
|
|||
%% @doc init internal ACL.
|
||||
-spec init(AclOpts :: list()) -> {ok, State :: any()}.
|
||||
init(AclOpts) ->
|
||||
ets:new(?ACL_RULE_TABLE, [set, public, named_table]),
|
||||
ets:new(?ACL_RULE_TABLE, [set, public, named_table, {read_concurrency, true}]),
|
||||
AclFile = proplists:get_value(file, AclOpts),
|
||||
Default = proplists:get_value(nomatch, AclOpts, allow),
|
||||
State = #state{acl_file = AclFile, nomatch = Default},
|
||||
|
|
Loading…
Reference in New Issue