同时读取和写入数组是否安全Go

Would this be safe to use? it doesnt matter if the read routine reads a partially updated array, but i need it to have all values intact. All 3 routines run in a loop

var arr [100]byte

go ReadFrom(arr)
go ReadFrom(arr)
go WriteTo(arr)

@Pownyan, no, not safe, as mentioned by JimB in the comments. You need mutex locks to make this safe: https://golang.org/pkg/sync/#Mutex

Example: https://gobyexample.com/mutexes

No, its not safe, you will need to use sync package Mutex or Waitgroup depends on the type of the solution flow, i recommend Mutex since it is cheaper than other channel based solutions.

please check the example here.