Re: [go-nuts] Not getting correct results with sort.Slice().

2017-11-09 Thread Gaurav Agarwal
Hi Jan, I am still unable to understand why is the contract broken? The "magnitude" of each entry in "indexes" slice is defined by less func in a consistent way. What exactly am I doing incorrect here? If I changed the program to create structs type entry struct { rating int index int } And

Re: [go-nuts] Fast ConcurrentCounter without memory sharing

2016-08-14 Thread Gaurav Agarwal
Ian, thanks for the explanation and the link ! But I am still unclear how to implement such a concurrent counter in Go - given that we can't find out what thread/cpu is the goroutine executing. Note that in this case there was never the need of pinning a goroutine to a thread or cpu; just that we