I am implementing a GenServer and I am confused.
I know handle_cast
is asynchronous, which means the caller is not waiting for a reply and we return a tuple like this: {:noreply, new_state}
.
I have noticed that we can also return the same tuple from handle_call
. Does it mean if I have a handle_call
that returns {:noreply, new_state}
, it wont return anything but will be synchronous? The flow of the caller will wait on the GenServer.call
command, and then continue after the handle_call
function has completed?