-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
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.
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 |
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.
// 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 |
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.
// 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, |
5f9ed29
to
8692552
Compare
8692552
to
095e324
Compare
done |
Thanks! |
PR for #1219