Skip to content

Commit

Permalink
gen: Use global:whereis_name/1 instead of safe_whereis_name/1.
Browse files Browse the repository at this point in the history
Improves lookup time (ets:lookup instead of gen_server:call) and
reduces load on 'global_name_server'.
  • Loading branch information
archaelus committed Mar 30, 2011
1 parent e36547e commit 4f6e8a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stdlib/src/gen.erl
Expand Up @@ -271,7 +271,7 @@ reply({To, Tag}, Reply) ->
%%%-----------------------------------------------------------------
%%% Misc. functions.
%%%-----------------------------------------------------------------
where({global, Name}) -> global:safe_whereis_name(Name);
where({global, Name}) -> global:whereis_name(Name);
where({local, Name}) -> whereis(Name).

name_register({local, Name} = LN) ->
Expand Down

0 comments on commit 4f6e8a1

Please sign in to comment.