3 ms·
> Go makes the assumption that the DNS lookups are thread-safe DNS functions are thread-safe. The thing people aren't understanding here is when you set loose
by o11c 3y ago
> Go makes the assumption that the DNS lookups are thread-safe
DNS functions are thread-safe.
The thing people aren't understanding here is when you set loose nasal demons (such as by calling `setenv` in a multithreaded program), they can cause problems even in safe code.
- dwattttt 3y agoIf a function is safe only if everyone else you rely on never calls a particular function, it's not that safe. Certainly less safe than other functions guaranteed not to result in crashes if you use them right.
- o11c 3y agoYou can make any safe function fail trivially with appropriate uses of unsafe functions. For example, imagine the chaos of `memset(stderr&-4096, 0x42, 4096)`.