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

doc: optimize the comment of the Request.Done method #1454

Merged
merged 1 commit into from
Dec 18, 2022

Conversation

li-jin-gou
Copy link
Contributor

PR for #1219

Copy link
Collaborator

@erikdubbelboer erikdubbelboer left a comment

Choose a reason for hiding this comment

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

Good comment, but just one small change.

server.go Outdated
@@ -2697,6 +2697,9 @@ func (ctx *RequestCtx) Deadline() (deadline time.Time, ok bool) {
// Done returns a channel that's closed when work done on behalf of this
// context should be canceled. Done may return nil if this context can
// never be canceled. Successive calls to Done return the same value.
//
// Note: Because creating a new channel for every request is just too expensive so
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Note: Because creating a new channel for every request is just too expensive so
// Note: Because creating a new channel for every request is just too expensive,

server.go Outdated
@@ -2707,6 +2710,9 @@ func (ctx *RequestCtx) Done() <-chan struct{} {
// If Done is closed, Err returns a non-nil error explaining why:
// Canceled if the context was canceled (via server Shutdown)
// or DeadlineExceeded if the context's deadline passed.
//
// Note: Because creating a new channel for every request is just too expensive so
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Note: Because creating a new channel for every request is just too expensive so
// Note: Because creating a new channel for every request is just too expensive,

@li-jin-gou
Copy link
Contributor Author

Good comment, but just one small change.

done

@erikdubbelboer erikdubbelboer merged commit 2a572e0 into valyala:master Dec 18, 2022
@erikdubbelboer
Copy link
Collaborator

Thanks!

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.

2 participants