Buglet in gen_server?

Chandrashekhar Mullaparthi <>
Mon Dec 2 10:55:14 CET 2002


This syntax is documented. 

Checkout http://www.erlang.org/doc/r9b/lib/stdlib-1.11.0/doc/html/index.html

Extract from the doc.

========

If ServerName={local,Name} the gen_server is registered locally as Name
using register/2. If ServerName=
{global,Name} the gen_server is registered globally as Name using
global:register_name/2. If no name is provided, the gen_server is not
registered

========

Not providing a name is useful when you want to have a supervised child
using the simple_one_for_one restart strategy.

cheers,
Chandru

-----Original Message-----
From: Bruce Fitzsimons [mailto:]
Sent: 02 December 2002 08:41
To: 
Subject: Buglet in gen_server?


Hi,

I've been using the emacs skeletons forever, and these do things such as:

gen_server:start_link({local, app}, app, [], []).

This syntax isn't documented in R9B, and is possibly deprecated, but the
interesting thing is that gen_server:call, and gen_server:start_link both
work, while gen_server:cast doesn't (and fails silently, the dangerous
little monster).

Is the ServerRef -> {local, app} syntax valid? deprecated? invalid?

Thanks,
Bruce





NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.




More information about the erlang-questions mailing list