[erlang-patches] Re: gen:call({global, Name}, ...)

Henrik Nord henrik@REDACTED
Thu Mar 31 14:57:15 CEST 2011


On 03/31/2011 12:28 PM, Henrik Nord wrote:
> On 03/30/2011 03:19 AM, Geoff Cant wrote:
>> Hi all, I discovered today that gen:call({global, Name}, Label, Request,
>> Timeout) calls global:safe_whereis_name(Name) to determine the Pid to
>> look up globally registered names.
>>
>> global:safe_whereis_name/1 doesn't seem to offer any particular safety
>> and more importantly, serializes all global name lookups on a node. 
>> (Using
>> global:whereis_name/1 instead is just an ets lookup).
>>
>> Can we safely make a change like
>> https://github.com/archaelus/otp/commit/4f6e8a147b3c600eef2dd05f8ce0d51cf9c35383 
>>
>> in gen.erl and improve call time and reduce the load on
>> global_name_server at a stroke?
>>
>> This git repo contains the patch I'm thinking of:
>> git fetch git://github.com/archaelus/otp.git gen_where
>>
>> Cheers,
> Hello
>
> Thank you!
> This branch is now cooking in 'pu'
>

Hello
This has apparently been tested before, and found to be unsafe.
So im pulling it out.

Thank you

-- 
/Henrik Nord Erlang/OTP




More information about the erlang-patches mailing list