Just reuse the created http.Client.
--
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 it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://grou
CAS with presence of transactions... Why?
Badger had CAS before they added transactions. Since you use Badger, I hope
your storage is also transactional.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop re
Have you not seen my post about joining a chat server?
Instead of waiting a day or so for each reply, people could reply instantly
and hold your hand through setting things up.
On Sunday, 27 May 2018 11:37:48 UTC+8, John wrote:
>
> Well I guess I would just use the Go playground so it is easier.
Well I guess I would just use the Go playground so it is easier.
On Saturday, May 26, 2018 at 8:27:59 PM UTC-7, John wrote:
>
> I tried to find the terminal button but did not find it. And also I don't
> know but does the welcome screen say welcome using or something. Because I
> can't find the
I tried to find the terminal button but did not find it. And also I don't
know but does the welcome screen say welcome using or something. Because I
can't find the blue vertical line on the right. But to make matters
worse Okay I confess: I am just a kid under 15, and me and my mom just
mov
On Sunday, May 27, 2018 at 1:22:58 AM UTC+10, Li Jianhua wrote:
>
>
>
> Will C++ do move more often and do copy less often with its specific move
> semantics. C++ will do move whenever possible, right?
>
Perhaps. It's difficult to tell, because C++ is a horribly complicated
language. Will C++
https://github.com/golang/go/issues/25588
Regards
Benny
--
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 it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more opti
Hey Jake,
Yes, i will probably go with the first option :) feel a bit massy but it is
probably the better way to go... Plus in my case probably the only way hahaha.
Thanks a lot for helping.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To u
Hi, i have memory leaks cause http Transport dies too slowly. I'v creating
Transports for checking proxy every 2 minute, so new Transports creates
faster that old dies.
Here i'm checking
func checkProxySOCKS(prox string, c chan QR, wg *sync.WaitGroup) (err error)
{
defer wg.Done()
di
So, it looks to me like 1 million URLS will spin up 1 million goroutines.
That seems unnecessary, and likely to be a problem. I usually default to
the simplest model, unless there is a reason to do otherwise. IMHO, here
that would be to spin up as many goroutines as you want to be working at
on
FYI, the standard way around this is to expose a "free" method from your
DLL for memory allocated by the DLL. The other way is to require that users
of the DLL supply the memory in advance to functions needing it. These two
methods are the ones used by the Windows libraries themselves. Pretty
s
On Saturday, May 26, 2018 at 11:22:58 AM UTC-4, Li Jianhua wrote:
>
>
> From: Ian Lance Taylor >
> Sent: Saturday, May 26, 2018 2:56 PM
> Subject: Re: [go-nuts] Does Golang need the innovation of C++ move
> semantics too
> To: Li Jianhua >
> Cc: >
>
>
> On Fri, May 25, 2018 at 8:15 PM, Li Jianhu
On Saturday, May 26, 2018 at 11:22:58 AM UTC-4, Li Jianhua wrote:
>
>
> From: Ian Lance Taylor >
> Sent: Saturday, May 26, 2018 2:56 PM
> Subject: Re: [go-nuts] Does Golang need the innovation of C++ move
> semantics too
> To: Li Jianhua >
> Cc: >
>
>
> On Fri, May 25, 2018 at 8:15 PM, Li Jianhu
On Saturday, May 26, 2018 at 10:59:34 AM UTC-4, Matthias B. wrote:
>
> On Sat, 26 May 2018 07:26:12 -0700 (PDT)
> T L > wrote:
>
> > Looks the answer is not. But any one can confirm this?
>
> I can tell you that your program does not have any defined behavior
> according to the Go language st
I am writing an application that has to fetch data from - say a million
URLs. I currently have an implementation which looks like the code below
//Make sure that we just have 500 or less goroutines fetching from URLs
sem := make(chan struct{}, min(500, len(urls)))
//Check if all URLs in the requ
From: Ian Lance Taylor
Sent: Saturday, May 26, 2018 2:56 PM
Subject: Re: [go-nuts] Does Golang need the innovation of C++ move semantics too
To: Li Jianhua
Cc:
On Fri, May 25, 2018 at 8:15 PM, Li Jianhua wrote:
>
> Why does C++ introduce move semantics anyway? What problems is it going to
>
On Sat, 26 May 2018 07:26:12 -0700 (PDT)
T L wrote:
> Looks the answer is not. But any one can confirm this?
I can tell you that your program does not have any defined behavior
according to the Go language standard, because your use of
unsafe.Pointer to reinterpret bytes as a pointer is not one
On Sat, 26 May 2018 03:15:45 +
Li Jianhua wrote:
> 1. Why does C++ introduce move semantics anyway? What problems is
> it going to solve? 2. How come Golang, C (Without ++) don’t have
> that move semantics yet? Will they need the move soon?
>
C++ is a language used among other things fo
Looks the answer is not. But any one can confirm this?
package main
import "fmt"
import "unsafe"
import "runtime"
var ha0, ha1, ha2 uint64
func f() **int {
for false{} // avoid f being inlined.
s := make([]byte, unsafe.Sizeof((*int)(nil))) // enough memory to hold
a pointer
pp
package main
import "fmt"
import "unsafe"
import "runtime"
func f() **int {
for false{} // avoid f being inlined.
s := make([]byte, unsafe.Sizeof((*int)(nil))) // enough memory to hold
a pointer
pp := (**int)(unsafe.Pointer(&s[0]))
x := 123
*pp = &x
return pp
}
va
It's different usecase in my opinion. With open census tracing, and go's
spans/regions all the work is on me putting those manually in the code -->
maintaining it, refactoring, etc. I haven't tried go's new ability though.
With only vanilla go trace, it's automatic. It's in the runtime, and thus I
And I am in desperate need of bugs!
--
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 it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://grou
Seven more examples added and other tiny improvements.
Next step is to add CAS features. There are two main options for this:
putting the CAS sequence/timestamp inside the document or as a separate
value. Each one has their pros and cons. I am trying to find out which
approach requires least ch
23 matches
Mail list logo