Wonderful!
The example in ttps://play.golang.org/p/GsffpJc1cX 
<https://play.golang.org/p/GsffpJc1cX> is great.
Thank you

在 2017年1月20日星期五 UTC+8上午7:04:02,freeformz写道:
>
> 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 <[email protected] 
> <javascript:>> 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 <[email protected]> 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 [email protected].
>>>
>>>
>>>> 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 [email protected] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to