Oh I see, I was thinking of the more specific question "Is appending to
slices thread-safe"

On Thu, Jan 19, 2017 at 3:03 PM Edward Muller <edwar...@interlix.com> wrote:

> Which may or may not have the same backing array.
>
> https://play.golang.org/p/GsffpJc1cX
>
> PS: I probably should have just said 'no. slices are not "thread-safe"'.
> I have complicated the issue to no benefit.
>
> On Thu, Jan 19, 2017 at 2:56 PM Jason Stillwell <dragon...@gmail.com>
> wrote:
>
> But it returns the new slice.
>
>
> On Thursday, January 19, 2017 at 2:40:30 PM UTC-8, freeformz wrote:
>
> No, it is not.*
>
> * appending can replace the underlying array, so in certain situations it
> can be, but that's more by accident IMO so just don't rely on that.
>
> On Thu, Jan 19, 2017 at 1:43 PM xiaohai dai <seaf...@gmail.com> wrote:
>
> I know that map in golang is not thread-safe for writing.
> However, I'm not sure slice/array is thread-safe for writing. I have
> searched the related posts and blogs in google, but find no unambiguous
> statement.
>
> Thanks in advance!
>
> --
> 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...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to