GenServer.call
call
, go back to GenServer module for more information.
Specs
Makes a synchronous call to the server
and waits for its reply.
The client sends the given request
to the server and waits until a reply
arrives or a timeout occurs. handle_call/3
will be called on the server
to handle the request.
server
can be any of the values described in the "Name registration"
section of the documentation for this module.
Timeouts
timeout
is an integer greater than zero which specifies how many
milliseconds to wait for a reply, or the atom :infinity
to wait
indefinitely. The default value is 5000
. If no reply is received within
the specified time, the function call fails and the caller exits. If the
caller catches the failure and continues running, and the server is just late
with the reply, it may arrive at any time later into the caller's message
queue. The caller must in this case be prepared for this and discard any such
garbage messages that are two-element tuples with a reference as the first
element.