Re: [go-nuts] Re: Golang concurrency design question

2016-07-13 Thread Richard Todd
To give the other side of the argument: If you have something useful to do between the loop and the wg.Wait(), that would be a reason to consider just launching them all. Also, I guess in theory the runtime's scheduler might do a better job if it knows about the total amount of work that's waiti

Re: [go-nuts] confused about string allocation

2016-07-11 Thread Richard Todd
There are places throughout the standard packages where extra copies happen due to []byte <-> string conversion (like strings.Join(), os.*File.WriteString() etc.) I am assuming they don't use an unsafe-magic way to make aliasing strings and []bytes because they don't want people to shoot them