Suppose I have a long-running computation that I wish to be cancelable via
a context. By this I mean something that's just churning away on some
computation, not blocking on a syscall or I/O operation or anything like
that. Should I just poll ctx.Err() periodically in the inner loop of my
computation?

Also, can anyone give any insight into approximately how costly
context.Err() is for the contexts constructed in the context package -- I
don't want my computation to be dominated by checking for cancellation!

-- 
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://groups.google.com/d/optout.

Reply via email to