[go-nuts] Re: Question on 'src/internal/singleflight': The return result of the ForgetUnshared method seems to be inaccurate

2022-09-22 Thread atomic
sync/commit/56d357773e8497dfd526f0727e187720d1093757 > > On Friday, September 23, 2022 at 9:23:29 AM UTC+7 atomic wrote: > >> Thank you so much, so happy, you are amazing. >> You answered a question that has been bothering me for days, I opened an >> issue on github, can you submit a

[go-nuts] Re: Question on 'src/internal/singleflight': The return result of the ForgetUnshared method seems to be inaccurate

2022-09-22 Thread atomic
0). But I've not been able to work out why >>> yet. >>> >>> Incidentally, a minor style observation: you passed in ctx to your go >>> func(...), but not cancel. As far as I can see, both ctx and cancel are >>> local variables which drop imm

[go-nuts] Re: Question on 'src/internal/singleflight': The return result of the ForgetUnshared method seems to be inaccurate

2022-09-21 Thread atomic
t; @@ -152,7 +152,7 @@ > }) > > // randomly choose a timeout to cancel > -cancelTime := time.After(randTimeout()) > +cancelTime := time.After(10 * time.Millisecond) > select { > case <-cancelTime: > // c

[go-nuts] Re: Question on 'src/internal/singleflight': The return result of the ForgetUnshared method seems to be inaccurate

2022-09-21 Thread atomic
.Sleep in your program, so the behavior is not predictable. In > fact, I get it success or panic randomly. > > You can see https://go-review.googlesource.com/c/sync/+/424114 to see a > predictable test of ForgetUnshared . > > On Wednesday, September 21, 2022 at 1:45:24 PM UTC+7

[go-nuts] Question on 'src/internal/singleflight': The return result of the ForgetUnshared method seems to be inaccurate

2022-09-20 Thread atomic
hello I find that the `src/internal/singleflight/singleflight.go ForgetUnshared()` method returns results that are not always expected For this I wrote a test code, I copied the code in the src/internal/singleflight/singleflight.go file to the main package, and wrote a main function to test it

Re: [go-nuts] crypto/X509 checkSignature: why the loop doesn't `break` after finding `algo`?

2022-05-17 Thread atomic
I am contributing code to golang for the first time, what do I need to do? Is it like this: I start an issue on github and then a pr? 在2022年5月18日星期三 UTC+8 10:31:39 写道: > > I'm happy to fix this > > 在2022年5月18日星期三 UTC+8 05:38:46 写道: > >> On Tue, May 17, 202

Re: [go-nuts] crypto/X509 checkSignature: why the loop doesn't `break` after finding `algo`?

2022-05-17 Thread atomic
I'm happy to fix this 在2022年5月18日星期三 UTC+8 05:38:46 写道: > On Tue, May 17, 2022 at 8:19 AM atomic wrote: > > > > crypto/X509 checkSignature: why the loop doesn't `break` after finding > `algo`? > > > > code: > https://github.com/golang/go/blob/a

[go-nuts] crypto/X509 checkSignature: why the loop doesn't `break` after finding `algo`?

2022-05-17 Thread atomic
hi~ crypto/X509 checkSignature: why the loop doesn't `break` after finding `algo`? code: https://github.com/golang/go/blob/aedf298daf508b564e4dddc7687fff8822315a5e/src/crypto/x509/x509.go#L818-L829 -- You received this message because you are subscribed to the Google Groups "golang-nuts" gro