On Monday, August 5, 2019 at 9:33:08 AM UTC-6, burak serdar wrote: > > On Mon, Aug 5, 2019 at 9:20 AM B Carr <buc...@gmail.com <javascript:>> > wrote: > > > > Oh. I'm talking about env variables which a goroutine sets by using > os.Setenv() which to me implies OS env variables. Are those env variables > accessible by all goroutines regardless of which goroutine set the env > variable? Would such env variables be available to newer goroutines that > spin up? I think the answer to this is "Yes", based on a response I got to > another thread. > > Those env variables belong to the process. All gorountines share them. > If you're setting env variables from goroutines, you might want to > think about thread safety of setenv.
Oh yes. I'm using a mutex. Thank you. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/7fd673ac-cc05-401d-ba6f-e07151fd6ab3%40googlegroups.com.