Spoke too soon - if you make cancelTimeout bigger than sleepDur, it doesn't end after sleepDur, it blocks until the cancelTimeout fires.
I'm going to stew on this some more. Art Mellor : a...@priestlyemus.com : 414-678-9011 On Tue, Sep 19, 2017 at 3:20 PM, Art Mellor <a...@priestlyemus.com> wrote: > Yes! That was what I needed - thanks! > > > Art Mellor : a...@priestlyemus.com : 414-678-9011 <(414)%20678-9011> > > > > On Tue, Sep 19, 2017 at 2:51 PM, Tamás Gulácsi <tgulacs...@gmail.com> > wrote: > >> ``` >> <-ctx.Done() >> err := ctx.Err() >> ``` >> just before printing out the error. >> >> 2017. szeptember 19., kedd 20:02:50 UTC+2 időpontban Art Mellor a >> következőt írta: >>> >>> One additional data point. If I add the following line right after >>> 'r.cmd.Run()' in RunMe.Run, it works: >>> >>> time.Sleep(1 * time.Nanosecond) >>> >>> It seems that the context error takes a moment to be filled in >>> properly... >>> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "golang-nuts" group. >> To unsubscribe from this topic, visit https://groups.google.com/d/to >> pic/golang-nuts/OzIpdnCi_LU/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> golang-nuts+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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.