Re: [go-nuts] Re: Thread safety programatic definition for Go

2017-01-01 Thread josvazg
Thanks, That was very useful, I did slip on the globals definition. And I also kind of overlook init()s running before main(). Although I have to check what happens exactly when a go statement is kicked off on an init() body, will it wait for main()? Also yes, the bottom line for race free code

Re: [go-nuts] Re: Thread safety programatic definition for Go

2017-01-01 Thread Michael Jones
Josvazg, Your notion of "globals safe" should allow init() functions as safe writers. They are always invoked serially. On Sun, Jan 1, 2017 at 7:29 AM wrote: > > On Sunday, January 1, 2017 at 4:43:32 AM UTC-7, josvazg wrote: > > I am trying to come up with a detailed definition of what a thread