Re: [go-nuts] Go http/2 implementation is x5 less per performant than http/1.1

2021-11-19 Thread robert engels
Correct. If you refer to the code in the OP you will see that different transports are created in order to test http1 vs http2. If you wish to use the default behavior to use http2 you need to rebuild the stdlib (at least as far as I understand the issue with h2_bundle). My patches only affect

Re: [go-nuts] Command stuck when using net/rpc & exec.Command

2021-11-19 Thread Kurtis Rader
On Fri, Nov 19, 2021 at 8:30 AM ChrisFisher wrote: > Hey Guys, I want to do a micro benchmark, and I have one master machine > and one worker machine. The master machine sends out rpcs concurrently to > the worker, and after the worker receive the rpc, it starts to do some > commands using exec.C

Re: [go-nuts] Race detector plus Cgo via binutils extld on arm64?

2021-11-19 Thread Ian Lance Taylor
On Fri, Nov 19, 2021 at 8:59 AM neilschel...@gmail.com wrote: > > Can anyone comment on whether arm64 race detection plus Cgo (via gcc and > binutils) is known to work or not? > > I'm running in to a bunch of mechanical problems getting a binary linked, let > alone running. Unfortunately, we ha

Re: [go-nuts] Go http/2 implementation is x5 less per performant than http/1.1

2021-11-19 Thread Jean-François Giorgi
I already use the replace directive for but this doesn't for the net/http h2_bundle thing. see https://www.youtube.com/watch?v=FARQMJndUn0&t=814s Le ven. 19 nov. 2021 à 18:33, Robert Engels a écrit : > > Use the replace directive to point the net package to your local copy. > > Much easier to t

Re: [go-nuts] Go http/2 implementation is x5 less per performant than http/1.1

2021-11-19 Thread Kirth Gersen
(sorry for the previous reply, wrong account) and sorry I wasn't clear enough: I already use the replace directive for x/net. this works fine for the POC but only when explicitly using a http2 transport. But this doesn't for the net/http because of the h2_bundle thing. see https://www.youtube.co

Re: [go-nuts] Go http/2 implementation is x5 less per performant than http/1.1

2021-11-19 Thread Robert Engels
Use the replace directive to point the net package to your local copy. Much easier to test X changes than stdlib changes. > On Nov 19, 2021, at 10:58 AM, Kirth Gersen wrote: > > Your CL works well with the POC. > > Side question not specific to this issue: how to test changes to > golang.

Re: [go-nuts] Delete from map failed golang

2021-11-19 Thread Brian Candler
> I would like to CtxStarStore would be access globally. As a general principle, I'd say try to avoid such global state. Most data structures in go are not safe for concurrent access from multiple goroutines: not only maps, but even things like integers. Concurrent access to maps or slices c

[go-nuts] Race detector plus Cgo via binutils extld on arm64?

2021-11-19 Thread neilschel...@gmail.com
Hi Folks, Can anyone comment on whether arm64 race detection plus Cgo (via gcc and binutils) is known to work or not? I'm running in to a bunch of mechanical problems getting a binary linked, let alone running. Unfortunately, we have unavoidable Cgo dependencies on a h/w support library. I'v

Re: [go-nuts] Go http/2 implementation is x5 less per performant than http/1.1

2021-11-19 Thread Kirth Gersen
Your CL works well with the POC. Side question not specific to this issue: how to test changes to golang.org/x/net with net/http ? The 'h2_bundle' trick with go generate & bundle requires to fork the std lib too ? I have a hard time figuring how to do this. I tried with gotip but I get an erro

Re: [go-nuts] Delete from map failed golang

2021-11-19 Thread Van Fury
Hi, Sorry, it was my stupid mistake. I was deleting with wrong key. @Kurtis: "That should work once you correct the initialization of the map" Is my map initialization not the best way? I mean var CtxStarStore = make(map[string]AuthCtx)

[go-nuts] Command stuck when using net/rpc & exec.Command

2021-11-19 Thread ChrisFisher
Hey Guys, I want to do a micro benchmark, and I have one master machine and one worker machine. The master machine sends out rpcs concurrently to the worker, and after the worker receive the rpc, it starts to do some commands using exec.Command. Here are parts of my code. master code

Re: [go-nuts] Delete from map failed golang

2021-11-19 Thread Kurtis Rader
On Fri, Nov 19, 2021 at 7:17 AM Van Fury wrote: > I have a map as shown below > > var CtxStarStore = make(map[string]AuthCtx) > > map[ccc-999401002:{989c48c5-7f9c-4058-80a2-b769ea4675f9 imei-1234010002} > bbb-999401003:{989c48c5-7f9c-4058-80a2-b769ea4675f9 imei-1234010003}] > This isn't legal Go

Re: [go-nuts] Delete from map failed golang

2021-11-19 Thread Levieux Michel
Hi, I reported your code into the playground for testing, and it seems to be working fine for me: https://play.golang.com/p/udsRN-iUQM8 I designed a simple AuthCtx struct based on your example but that should not change anything. Maybe it would be easier to help with more details. Why do you say

[go-nuts] Delete from map failed golang

2021-11-19 Thread Van Fury
Hi I have a map as shown below var CtxStarStore = make(map[string]AuthCtx) map[ccc-999401002:{989c48c5-7f9c-4058-80a2-b769ea4675f9 imei-1234010002} bbb -999401003:{989c48c5-7f9c-4058-80a2-b769ea4675f9 imei-1234010003}] I would like to delete ccc-999401002 or any key value from the map I tri

Re: [go-nuts] About Enums

2021-11-19 Thread Shreyas Sreenivas
> But on the other hand there is a common expectation that it is > possible to write a loop over all enumeration values, which is easy in > C but is not clearly supported by your suggested syntax Yeah, I had this in mind but forgot to add it. I thought we could just use `range` like below: ``` ty