Also -race does not complain about this: 
https://play.golang.org/p/IeA4npcemf5

On Monday, April 23, 2018 at 10:51:05 AM UTC+4:30, Kaveh Shahbazian wrote:
>
> @Silviu The code is mutating same item from two goroutines. While the 
> original target is to create a buffer pool that their items is not being 
> mutated from two goroutines - actually they can not do that because at a 
> specific time only one goroutine has access to one buffer.
>
> @Tamas Regarding "If there's no uncoordinated write and read/write of the 
> same slot, then it's race-free", is it safe to use slices with a shared 
> underlying array, to be mutated from different goroutine? Every goroutine 
> has access to one slice and that slice is only accessible to that one 
> goroutine - until the goroutine is done and returns the slice to the pool.
>
>>

-- 
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