Permalink
Browse files

No such ETS option in R12B

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
  • Loading branch information...
1 parent b5fab93 commit 2c831f091a085c6719da6150e2ff6db81f326e67 @lemenkov committed Jun 1, 2012
Showing with 3 additions and 7 deletions.
  1. +1 −3 src/gproc.erl
  2. +0 −2 src/gproc_lib.erl
  3. +2 −2 test/gproc_tests.erl
View
@@ -1437,11 +1437,9 @@ pid_to_give_away_to({T,l,_} = Key) when T==n; T==a ->
end.
create_tabs() ->
- Opts = gproc_lib:valid_opts(ets_options, [{write_concurrency,true},
- {read_concurrency, true}]),
case ets:info(?TAB, name) of
undefined ->
- ets:new(?TAB, [ordered_set, public, named_table | Opts]);
+ ets:new(?TAB, [ordered_set, public, named_table]);
_ ->
ok
end.
View
@@ -287,8 +287,6 @@ check_opts(Type, Other) ->
check_option_f(ets_options) -> fun check_ets_option/1;
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}) ->
@@ -43,14 +43,14 @@ t_server_opts() ->
t_ets_opts() ->
%% Cannot inspect the write_concurrency attribute on an ets table in
%% any easy way, so trace on the ets:new/2 call and check the arguments.
- application:set_env(gproc, ets_options, [{write_concurrency, false}]),
+ application:set_env(gproc, ets_options, []),
erlang:trace_pattern({ets,new, 2}, [{[gproc,'_'],[],[]}], [global]),
erlang:trace(new, true, [call]),
?assert(ok == application:start(gproc)),
erlang:trace(new, false, [call]),
receive
{trace,_,call,{ets,new,[gproc,Opts]}} ->
- ?assertMatch({value, {write_concurrency, false}},
+ ?assertMatch(false,
lists:keysearch(write_concurrency,1,Opts))
after 3000 ->
erlang:error(timeout)

0 comments on commit 2c831f0

Please sign in to comment.