• Bryan C. Mills's avatar
    net/context: Don't leak goroutines in Done example. · 59b0df9b
    Bryan C. Mills authored
    The current example leaks the DoSomethingSlow goroutine for an
    arbitrarily long time.  In a real server, that can lead to an
    out-of-memory failure during events such as network outages; a
    more careful version of that example would be too long for a
    simple package doc.
    
    Fortunately, there are other short, common patterns using Done
    that don't leak and don't require a lot of explanation.  Let's
    use one of those instead.
    
    Change-Id: I0ad0c6121d06b757a397e0e71be9e01ccfd75f77
    Reviewed-on: https://go-review.googlesource.com/4490Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    59b0df9b
Name
Last commit
Last update
context Loading commit data...
dict Loading commit data...
html Loading commit data...
icmp Loading commit data...
idna Loading commit data...
internal Loading commit data...
ipv4 Loading commit data...
ipv6 Loading commit data...
netutil Loading commit data...
proxy Loading commit data...
publicsuffix Loading commit data...
spdy Loading commit data...
webdav Loading commit data...
websocket Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...