Re: [go-nuts] Race detector compatible ring buffer Part II

2022-03-11 Thread Robert Engels
Btw, for those interesting in some neat highly optimized queue patterns check out https://lmax-exchange.github.io/disruptor/ > On Mar 11, 2022, at 5:58 PM, Robert Engels wrote: > >  > “Usually” SPSC means it is optimized for that case but it doesn’t fail in > case of multiple writers. It it

Re: [go-nuts] Race detector compatible ring buffer Part II

2022-03-11 Thread Robert Engels
“Usually” SPSC means it is optimized for that case but it doesn’t fail in case of multiple writers. It it usually easier to prevent multiple readers as the reader can be controlled during init and hidden. > On Mar 11, 2022, at 4:41 PM, 'Axel Wagner' via golang-nuts > wrote: > >  > > >>

Re: [go-nuts] Go install

2022-03-11 Thread Jason E. Aten
It looks like you are running into one of the various dubious Windows "security" features, this one seems related to "User Account Control". If you haven't solved this yet, try googling for the error that you are getting. For example, I searched "windows 10 user account control do you want to

Re: [go-nuts] Race detector compatible ring buffer Part II

2022-03-11 Thread 'Axel Wagner' via golang-nuts
On Fri, Mar 11, 2022 at 4:51 PM Gregg Townsend wrote: > Well, the suggested code passes the race detector, but shouldn't it also > be *correct*? > Two concurrent calls of Put can load identical head and tail values and > then store in the same slot. > The premise is that there is a single

Re: [go-nuts] Race detector compatible ring buffer Part II

2022-03-11 Thread Ian Lance Taylor
On Fri, Mar 11, 2022 at 9:26 AM Brian Candler wrote: > > On Friday, 11 March 2022 at 15:52:04 UTC Gregg Townsend wrote: >> >> Two concurrent calls of Put can load identical head and tail values and then >> store in the same slot. > > > Correct, but that's not a valid way to use this code. See >

Re: [go-nuts] Race detector compatible ring buffer Part II

2022-03-11 Thread Brian Candler
On Friday, 11 March 2022 at 15:52:04 UTC Gregg Townsend wrote: > Two concurrent calls of Put can load identical head and tail values and > then store in the same slot. > Correct, but that's not a valid way to use this code. See

Re: [go-nuts] Race detector compatible ring buffer Part II

2022-03-11 Thread Ian Lance Taylor
On Thu, Mar 10, 2022 at 10:31 PM Cameron Elliott wrote: > > Ian, thank you very much for the suggestion to use atomics. > Unfortunately, for a standard SPSC ring buffer, I don't think it does the > trick. > > > I am attaching a simple ring buffer program at the end. > > If you run 'go run -race

Re: [go-nuts] Race detector compatible ring buffer Part II

2022-03-11 Thread Gregg Townsend
Well, the suggested code passes the race detector, but shouldn't it also be *correct*? Two concurrent calls of Put can load identical head and tail values and then store in the same slot. See https://go.dev/play/p/gagBCCj2n2g?v=gotip for a demonstration. On Friday, March 11, 2022 at 12:24:42

Re: [go-nuts] Re: Pod memory keeps on increasing and restart with error OOMKilled

2022-03-11 Thread Robert Engels
I think your best course of action is to go to the Kafka forums. > On Mar 10, 2022, at 10:12 PM, Rakesh K R wrote: > > Hi, > Thank you. I know its kafka related question but thread started with issue in > golang but later we are suspecting issue in go kafka library configuration. > FYI, I am

[go-nuts] playground: about the v query parameter

2022-03-11 Thread Manlio Perillo
The recent version of the playground allows selecting the "Go release" or "Go dev branch" compiler using a drop-down list. The playground also accepts the v query parameter, and, when set, a new "Backend: $v" entry is added to the drop-down. What does Backend means here? Here are some