Skip to content
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

Merged
merged 7 commits into from
Jun 8, 2019
Merged

Imp: add Client.GetPendingResponse to limit the lock scope #83

merged 7 commits into from
Jun 8, 2019

Conversation

AlexStocks
Copy link
Contributor

What this PR does:

  • 1 add Client.GetPendingResponse to limit the lock scope;
  • 2 delete getty.GetTimeWheel()

@fangyincheng
Copy link
Contributor

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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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 ?

@@ -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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is NewReaderSize bad?

Copy link
Contributor Author

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.

@lovepoem lovepoem merged commit 4f7ef9d into apache:master Jun 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants