mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-18 10:24:42 +08:00
去掉GR模式
This commit is contained in:
@@ -62,7 +62,6 @@ func (slf *Client) AsycGo(rpcHandler IRpcHandler,mutiCoroutine bool,serviceMetho
|
||||
|
||||
request := &RpcRequest{}
|
||||
request.NoReply = false
|
||||
request.MutiCoroutine = mutiCoroutine
|
||||
call.Arg = args
|
||||
slf.pendingLock.Lock()
|
||||
slf.startSeq += 1
|
||||
@@ -92,13 +91,12 @@ func (slf *Client) AsycGo(rpcHandler IRpcHandler,mutiCoroutine bool,serviceMetho
|
||||
return call.Err
|
||||
}
|
||||
|
||||
func (slf *Client) Go(noReply bool,mutiCoroutine bool,serviceMethod string, args interface{},reply interface{}) *Call {
|
||||
func (slf *Client) Go(noReply bool,serviceMethod string, args interface{},reply interface{}) *Call {
|
||||
call := new(Call)
|
||||
call.done = make(chan *Call,1)
|
||||
call.Reply = reply
|
||||
|
||||
request := &RpcRequest{}
|
||||
request.MutiCoroutine = mutiCoroutine
|
||||
request.NoReply = noReply
|
||||
call.Arg = args
|
||||
slf.pendingLock.Lock()
|
||||
@@ -137,7 +135,6 @@ type RpcRequest struct {
|
||||
Seq uint64 // sequence number chosen by client
|
||||
ServiceMethod string // format: "Service.Method"
|
||||
NoReply bool //是否需要返回
|
||||
MutiCoroutine bool // 是否多协程模式
|
||||
|
||||
//packbody
|
||||
InParam []byte
|
||||
@@ -193,7 +190,6 @@ func (slf *Client) Run(){
|
||||
v.Err= respone.Err
|
||||
}
|
||||
|
||||
|
||||
if v.callback.IsValid() {
|
||||
v.rpcHandler.(*RpcHandler).callResponeCallBack<-v
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user