Fix race condition if exec's context is canceled just after completion
Only call interrupt
if the original exec
has not yet finished
Fixes #94 (closed)
The attached test case for me fails 100% without the fix, and passes 100% (at least after a few runs of go test . -run TestCancelRace -count 1000
) with the fix.
I've also verified my full application no longer experiences the error with these fixes.
Edited by Matthew Gabeler-Lee