Can someone share using go routine to handle multiple request?

Can someone share what is the best approach to handle multiple request in http.HandlerFunc?

If you mean multiple HTTP requests, http.Server handles each request in a separate go routine. Since your handler will be ran concurrently, it should not do anything that is unsafe for concurrent access (e.g., data races).


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.