• Russ Cox's avatar
    net: limit number of concurrent cgo calls · 1d3efd65
    Russ Cox authored
    The limit is 500. There is no way to change it.
    This primarily affects name resolution.
    If a million goroutines try to resolve DNS names,
    only 500 will get to execute cgo calls at a time.
    But in return the operating system will not crash.
    
    Fixes #5625.
    
    R=golang-dev, dan.kortschak, r, dvyukov
    CC=bradfitz, golang-dev
    https://golang.org/cl/13038043
    1d3efd65
net.go 11.6 KB