Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The described problem (thread safety) for a global configuration seems mostly a misunderstanding by the author.

The usual case for modifying a global state is: modify once, then proceed (e.g. start new threads). Even if all the calls become thread safe, the behavior would be inconsistent, still.



It is perfectly reasonable and consistent for one thread to set an environment variable while other threads are reading different environment variables.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: