A trial implementation of block_call that I left half way in the process.
Implementation:
block_call(Node, M, F, RecvTO)
block_call(Node, M, F, A, RecvTO
block_call(Node, M, F, A, RecvTO, SendTO)
Basically the same as Call except not have a worker to handle the call processing.
Rpc doc on block_call refers to not creating a separate process to handle the call. Block the RPC server from any other incoming requests until the request has been handled....
Since there is no worker process and the intention is to block RPC server.
RecvTO for gen_server:call inside block_call. Call will timeout on request if result does not arrive within timeout.
SendTO remains as it has nothing to do with call execution but more or less on network etc.
The CallerPid is sent along with the Actual Request to server. The result from server that comes back to gen_rpc_client returns with the CallerPid.
Despite some waste, There is no need to keep track of the CallerPid if it is part of the Request and Result payload.
The gen_rpc_client will gen_server:reply to Caller with the Result.
If this is incorrect or you have better approach, please feel free to rework/junk it as you see fit.
Basically the same as Call except not have a worker to handle the call processing. Rpc doc on block_call refers to not creating a separate process to handle the call. Block the RPC server from any other incoming requests until the request has been handled....
If this is incorrect or you have better approach, please feel free to rework/junk it as you see fit.
Ref: http://www.erlang.org/doc/man/rpc.html