Re: [go-nuts] Definition of Method sets

2020-09-04 Thread Yuu LongXue
yeah,this is really a subtle point, Thank You For Your Addition. > On Sep 4, 2020, at 10:11 PM, Marvin Renich wrote: > > Marvin -- 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

[go-nuts] Definition of Method sets

2020-09-04 Thread Yuu LongXue
Hi all, I’m confused by the "method set" defined in go specification,any one can help explain? The Go Programming Language Specification says that : ``` The method set of any other type T consists of all methods declared with receiver type T. The method set of

Re: [go-nuts] append slice concurrently without lock,after that panic occurred when iterate the slice

2020-03-10 Thread Yuu LongXue
scraps of it and from that you switch to > the source/compiled code to figure out where is the race condition or > undefined behavior. In your case it’s obvious so don’t waste time on it. > > > > On Mon, 9 Mar 2020 at 16:16, Yuu LongXue <mailto:longxue...@gmail.com>>

Re: [go-nuts] Re: append slice concurrently without lock,after that panic occurred when iterate the slice

2020-03-10 Thread Yuu LongXue
s: > https://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong > > > > On Monday, March 9, 2020 at 11:17:10 AM UTC-4, Yuu LongXue wrote: > Hi all, > > Slice is not thread safe for write operation if without lock, this is true

[go-nuts] append slice concurrently without lock,after that panic occurred when iterate the slice

2020-03-09 Thread Yuu LongXue
Hi all, Slice is not thread safe for write operation if without lock, this is true and I know this feature. but recently, I got a panic which caused by writing a slice concurrently with out lock occasionally and I can't figure out why. ### the process as below: 1. define a slice: var x