rpc内存池优化

This commit is contained in:
boyce
2021-01-08 11:01:09 +08:00
parent 7e288ccdd8
commit 0475edbf9e
3 changed files with 9 additions and 6 deletions

View File

@@ -144,7 +144,7 @@ func (call *Call) Done() *Call{
}
func MakeRpcRequest(rpcProcessor IRpcProcessor,seq uint64,rpcMethodId uint32,serviceMethod string,noReply bool,inParam []byte) *RpcRequest{
rpcRequest := rpcRequestPool.Get().(*RpcRequest).Clear()
rpcRequest := rpcRequestPool.Get().(*RpcRequest)
rpcRequest.rpcProcessor = rpcProcessor
rpcRequest.RpcRequestData = rpcRequest.rpcProcessor.MakeRpcRequest(seq,rpcMethodId,serviceMethod,noReply,inParam)