title: why does go mux block with time.sleep when called from same browser?
body: <p>Here is my code:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "log"
      "net/http"
      "time"
  )
  
  func gotest(w http.ResponseWriter, req *http.Request) {
      log.Printf("starting ... Go Test()")
      for i := 0; i &lt; 10; i++ {
          time.Sleep(2 * time.Second)
          log.Printf("Go Test %s", i)
          fmt.Fprintf(w, "Go Test %s", i)
      }
  }
  
  func main() {
      http.HandleFunc("/gotest", gotest)
      http.ListenAndServe(":3016", nil)
  }
  </code></pre>
  
  <p>Running <a href="http://localhost:3016/gotest" rel="nofollow noreferrer">http://localhost:3016/gotest</a> multiple windows using the same browser results in the gotest function running serial (not concurrent)</p>
  
  <pre><code>2020/02/22 01:24:26 starting ... Go Test()
  2020/02/22 01:24:28 Go Test %!s(int=0)
  2020/02/22 01:24:30 Go Test %!s(int=1)
  2020/02/22 01:24:32 Go Test %!s(int=2)
  2020/02/22 01:24:34 Go Test %!s(int=3)
  2020/02/22 01:24:36 Go Test %!s(int=4)
  2020/02/22 01:24:38 Go Test %!s(int=5)
  2020/02/22 01:24:40 Go Test %!s(int=6)
  2020/02/22 01:24:42 Go Test %!s(int=7)
  2020/02/22 01:24:44 Go Test %!s(int=8)
  2020/02/22 01:24:46 Go Test %!s(int=9)
  2020/02/22 01:24:46 starting ... Go Test()
  2020/02/22 01:24:48 Go Test %!s(int=0)
  2020/02/22 01:24:50 Go Test %!s(int=1)
  2020/02/22 01:24:52 Go Test %!s(int=2)
  ...
  </code></pre>
  
  <p>However, running <a href="http://localhost:3016/gotest" rel="nofollow noreferrer">http://localhost:3016/gotest</a> in different browsers or via curl on the command line will result in concurrent execution:</p>
  
  <pre><code>2020/02/22 01:28:55 starting ... Go Test()
  2020/02/22 01:28:57 Go Test %!s(int=0)
  2020/02/22 01:28:58 starting ... Go Test()
  2020/02/22 01:28:59 Go Test %!s(int=1)
  2020/02/22 01:29:00 Go Test %!s(int=0)
  2020/02/22 01:29:01 Go Test %!s(int=2)
  2020/02/22 01:29:02 Go Test %!s(int=1)
  2020/02/22 01:29:03 Go Test %!s(int=3)
  2020/02/22 01:29:04 Go Test %!s(int=2)
  2020/02/22 01:29:05 Go Test %!s(int=4)
  ...
  </code></pre>
  
  <p>Why would it matter if the url is called from different windows or tabs of the same browser vs called from different browsers?</p>