The net/http library is the caller in this case,
so that would be consistent with the rule that callers
should start goroutines.
Request handlers are a bit of a special case too, in that
they are a framework for dispatching tasks to be worked on;
what is main() for a command line program is the request
handler for a webserver. It seems fair that there is some
concurrency coordination happening at the top level.
Yeah, but it doesn't spin up a thousand for every request. And it doesn't require you to start them. It starts them under the covers as part of the API.
gnoack|6 years ago
Request handlers are a bit of a special case too, in that they are a framework for dispatching tasks to be worked on; what is main() for a command line program is the request handler for a webserver. It seems fair that there is some concurrency coordination happening at the top level.
asdfasgasdgasdg|6 years ago
jjbiotech|6 years ago
* Don't require users of your API to start [additional] goroutines to use your API correctly.