-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imp: add Client.GetPendingResponse to limit the lock scope #83
Conversation
The ut is failed. Pls try to"go test ./..." |
@@ -201,6 +201,13 @@ func (c *Client) AsyncCall(addr string, svcUrl common.URL, method string, args i | |||
return perrors.WithStack(c.call(CT_TwoWay, addr, svcUrl, method, args, reply, callback, copts)) | |||
} | |||
|
|||
func (c *Client) GetPendingResponse(seq SequenceType) *PendingResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to change GetPendingResponse to getPendingResponse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. It is invoked by other funcs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addPendingResponse
and removePendingResponse
both are lowercase . Should GetPendingResponse
be called by other package ?
protocol/dubbo/codec.go
Outdated
@@ -74,7 +74,7 @@ func (p *DubboPackage) Marshal() (*bytes.Buffer, error) { | |||
} | |||
|
|||
func (p *DubboPackage) Unmarshal(buf *bytes.Buffer, opts ...interface{}) error { | |||
codec := hessian.NewHessianCodec(bufio.NewReaderSize(buf, buf.Len())) | |||
codec := hessian.NewHessianCodec(bufio.NewReader(buf)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is NewReaderSize bad?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. I will change back.
What this PR does: