Skip to content

Handle ctx.Done() when waiting for steps to finish

Warren Gifford requested to merge mrn/handle-cancel-wait into main

Created by: mrnugget

The .Wait() method didn't check ctx.Done() before and could instead block on x.par.Wait(), waiting for a mutex.

I ran into this just now when my Docker became unresponsive and the docker run in (*dockerVolumeWorkspace).runScript would block.

Ctrl-C didn't help and did not kill the docker process (why that didn't happen is a separate question). But src-cli also didn't exit because it was blocked waiting for that mutex.

So, this solves another case of src-cli becoming unresponsive.

Merge request reports

Loading