[erlang-questions] gen_server and the ! operator

ulf_A uaforum1@REDACTED
Wed Apr 15 05:20:49 CEST 2009


i have a understanding problem with otp gen_server and the ! (send)

In my small test programm, i use the "normal" way to use the gen_server

example:  myServer:findById(Id).

This example use the module mySever with the behavior gen_server and calls
the exported function findById with the parameter Id. That means, that the
caller has to know the target module. 

In my next example, i only know the name of the server, not more.

I want to do is this:

whereis(myServer) ! {Id}.

I lookup the registered name myServer and then i want to send a message to
the pid. But every time i try it i get no result.

Is there anybody who can tell me how to send a message to the pid of a

View this message in context: http://www.nabble.com/gen_server-and-the-%21-operator-tp23023749p23023749.html
Sent from the Erlang Questions mailing list archive at Nabble.com.

More information about the erlang-questions mailing list