You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
process_launcher waits for its sub-processes when the process is stopped by a StopTask #499
When a process is stopped by a StopTask while process_launcher sub-processes are still running, the process only ends when all of them have finished, instead of stopping them. The documentation ("When the process fails or is stopped (stop request, StopTask) while sub-processes are still running, they are stopped when the task is finalized") and the CHANGELOG of #396 / #459 announce the stop.
the process fails: the sub-processes are stopped together (warning "4 sub-process(es) still running at the end of the process have been stopped"), 9 s in total;
the process is stopped by a StopTask downstream: 32 s, the 4 sub-processes end ("succeed"), no warning.
Cause: the stop is not propagated to the launcher; ProcessManager::resolve() flushes it, and ProcessLauncherTask::next() returns true in flush mode while sub-processes are running: the flush waits for all of them; finalize() is only reached after their natural end. A failure goes round the flush (exception), hence the expected behaviour.
Proposed fix
In ProcessLauncherTask::flush() / next(), when the process has been stopped (ProcessHistory::isStopped()), do not wait: skip the flush, so that finalize() stops the sub-processes together.
Activity
Merge pull request #500 from cleverage/499