Hi, I try understand GenServer .
Why GenServer.call is synchronous ? I want to get, in asynchronous way, information about state of the pid, but I can’t.
For example if I send 1000 of GenServer.call(pid,:get) via :
[ Task.await(Task.async(fn → Genserver.call(pid,:get) end)) , [ Task.await(Task.async(fn → Genserver.call(pid,:get) end)) , … , … ]
when I get the last one I have to wait 999 times.
Maybe it is stupid question , but for me GenServer.call should be asynchronous because we want read state and GenServer.cast should be synchronous cause we modify the state (and we should lock state during modification) .
But the situation is opposite and I don’t understand why .
Thanks in advance for answer .






















