-
Brad Fitzpatrick authored
Implement what Chrome calls socket "late binding". See: https://insouciant.org/tech/connection-management-in-chromium/ In a nutshell, if our HTTP client needs a TCP connection to a remote host and there's not an idle one available, rather than kick off a dial and wait for that specific dial, we instead kick off a dial and wait for either our own dial to finish, or any other TCP connection to that same host to become available. The implementation looks like a classic "Learning Go Concurrency" slide. Chrome's commit and numbers: http://src.chromium.org/viewvc/chrome?view=rev&revision=36230 R=golang-dev, daniel.morsing, adg CC=golang-dev https://golang.org/cl/7587043
b6e0d39a