Permalink
Browse files

gen: Use global:whereis_name/1 instead of safe_whereis_name/1.

Improves lookup time (ets:lookup instead of gen_server:call) and
reduces load on 'global_name_server'.
  • Loading branch information...
1 parent e36547e commit 4f6e8a147b3c600eef2dd05f8ce0d51cf9c35383 @archaelus committed Mar 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/stdlib/src/gen.erl
View
@@ -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) ->

0 comments on commit 4f6e8a1

Please sign in to comment.