Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
1a03580e
Commit
1a03580e
authored
Jan 16, 2013
by
Matthew Dempsky
Committed by
Brad Fitzpatrick
Jan 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/http: Serve creates service goroutines, not service threads
R=bradfitz CC=golang-dev
https://golang.org/cl/7132045
parent
3b73aaaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
server.go
src/pkg/net/http/server.go
+2
-2
No files found.
src/pkg/net/http/server.go
View file @
1a03580e
...
...
@@ -1216,7 +1216,7 @@ func HandleFunc(pattern string, handler func(ResponseWriter, *Request)) {
}
// Serve accepts incoming HTTP connections on the listener l,
// creating a new service
thread for each. The service thread
s
// creating a new service
goroutine for each. The service goroutine
s
// read requests and then call handler to reply to them.
// Handler is typically nil, in which case the DefaultServeMux is used.
func
Serve
(
l
net
.
Listener
,
handler
Handler
)
error
{
...
...
@@ -1250,7 +1250,7 @@ func (srv *Server) ListenAndServe() error {
}
// Serve accepts incoming connections on the Listener l, creating a
// new service
thread for each. The service thread
s read requests and
// new service
goroutine for each. The service goroutine
s read requests and
// then call srv.Handler to reply to them.
func
(
srv
*
Server
)
Serve
(
l
net
.
Listener
)
error
{
defer
l
.
Close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment