Re: [go-nuts] Clarification related to HTTP request context cancellations and goroutines

2021-01-08 Thread Robert Engels
Depends on how quickly you want the expensive operation to terminate. Unless it is cpu bound the expensive operation probably is making IO calls - pass the context to those so the cancel will propagate. If it doesn’t I think a periodic poll/check of the context is simpler. > On Jan 8, 2021, at

Re: [go-nuts] Clarification related to HTTP request context cancellations and goroutines

2021-01-08 Thread Amit Saha
> On 8 Jan 2021, at 1:59 pm, Robert Engels wrote: > > You need to pass the context to the expensive work a periodically check if it > has been cancelled. Thanks. I was thinking how to implement this. Is this a nice way to do it? func clientDisconnected(ctx context.Context, done chan bool)

Re: [go-nuts] an open source project to replace SMTP/email

2021-01-08 Thread Tyler Compton
Seems cool Liam, thanks for sharing! On Tue, Jan 5, 2021 at 2:30 PM Liam wrote: > > The mnm project is building a legitimate email replacement: a client[1], a > server[2], and a simple protocol[3] between them. (Legitimate, i.e. > n-identity, decentralized, store-and-forward, open protocol, open

[go-nuts] Re: HTTP RequestWithContext in a server and error handling pattern

2021-01-08 Thread Amit Saha
> On 9 Jan 2021, at 9:50 am, Amit Saha wrote: > > Say I have created a RequestWithContext: > > r, err := http.NewRequestWithContext(ctx, "GET", > "http://127.0.0.1:8080/healthcheck";, nil) > > Now, I make the request in the context of *another* HTTP request handling > function: > > Func m

Re: [go-nuts] Thread safe tree library?

2021-01-08 Thread K. Alex Mills
> I was thinking of potential issues if you rebalance the tree as an example. > > I’m not certain what issues could arise as I’ve never considered a > concurrent data structure that lacks some kind of synchronisation for both > read and writes unless it’s immutable copy-on-write or similar. > > Do

[go-nuts] HTTP RequestWithContext in a server and error handling pattern

2021-01-08 Thread Amit Saha
Say I have created a RequestWithContext: r, err := http.NewRequestWithContext(ctx, "GET", "http://127.0.0.1:8080/healthcheck";, nil) Now, I make the request in the context of *another* HTTP request handling function: Func myHandler(w http.ResponseWriter, r *http.Request) { ... resp, err := cl

Re: [go-nuts] Thread safe tree library?

2021-01-08 Thread Robert Engels
I would review the source code of the Java concurrent package. It has links to the relevant academic research. > On Jan 8, 2021, at 1:29 PM, Nathan Fisher wrote: > >  > I was thinking of potential issues if you rebalance the tree as an example. > > I’m not certain what issues could arise as

Re: [go-nuts] gollvm: capture-fcn-attributes.go generates the header file with improperly chosen CPU model (i686; yonah)

2021-01-08 Thread Ivan Serdyuk
CC'ing to Jayesh, Sreenivas, Adarsh from Intel. I am BCC'ing to Sameeran, Tejas from AMD. On Thu, Jan 7, 2021 at 12:21 AM Ivan Serdyuk wrote: > I assume that this should be enforced by CMake - so some build flag would > be provided. So the "default" schema would be to cover all per-project > ar

Re: [go-nuts] Thread safe tree library?

2021-01-08 Thread Nathan Fisher
I was thinking of potential issues if you rebalance the tree as an example. I’m not certain what issues could arise as I’ve never considered a concurrent data structure that lacks some kind of synchronisation for both read and writes unless it’s immutable copy-on-write or similar. Do you happen t