• Sameer Ajmani's avatar
    go.net/context: split the implementations of Background, WithValue, · a67aa996
    Sameer Ajmani authored
    WithCancel, and WithTimeout to use different concrete types.  Update the
    tests and documentation.
    
    This change reduces the size of context structs, reduces the number of
    allocations (see TestAllocs) and removes unnecessary pointers from the
    heap, such as the timer field for non-timer contexts.
    
    IMPORTANT: I've removed the code in these functions that handles nil Context parameters.  Passing a nil parent Context will now cause a panic.
    
    LGTM=bcmills
    R=bcmills, crawshaw
    CC=adonovan, golang-codereviews, rsc
    https://golang.org/cl/116400043
    a67aa996
Name
Last commit
Last update
context Loading commit data...
dict Loading commit data...
html Loading commit data...
idna 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...
websocket Loading commit data...
.hgignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
codereview.cfg Loading commit data...