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
> 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)
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
> 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
> 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
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
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
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
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