C interface example
Martin Bjorklund
mbj@REDACTED
Thu Oct 7 08:31:00 CEST 1999
"Vance Shipley" <vances@REDACTED> wrote:
> Tobbe,
>
> Interesting. I hadn't noticed that you can send using:
>
> {RegProc,Node} ! Msg
>
> I have been using:
>
> global:registered_name(Regproc} ! Msg
>
> Now I like the simplicity and elegance of your syntax
> but it forces me to know the node that the process runs on.
> Why would this be?
These are two different mechanisms. The former sends a message to the
_locally_ registered process RegProc at Node, and the latter sends a
message to the _globally_ registered process Regproc. Note that the
same process can have a local name and/or a global name, and they need
not be the same.
In this case, the first mechanism might be a good candidate because
you'll have to know the node name in order to set up a connection to
the node. When the connection has been set up, you can send pids
between the nodes.
/martin
More information about the erlang-questions
mailing list