Skip to content

Commit a10afd1

Browse files
committed
Only cleanup worker processes if they still exist
Previously this was attempting to cleanup processes that had already died, which caused exceptions.
1 parent eb5bff9 commit a10afd1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: src/sch/Sch.jl

+6-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,12 @@ function cleanup_proc(state, p, log_sink)
406406
delete!(WORKER_MONITOR_CHANS[wid], state.uid)
407407
end
408408
end
409-
remote_do(_cleanup_proc, wid, state.uid, log_sink)
409+
410+
# If the worker process is still alive, clean it up
411+
if wid in workers()
412+
remote_do(_cleanup_proc, wid, state.uid, log_sink)
413+
end
414+
410415
timespan_finish(ctx, :cleanup_proc, (;worker=wid), nothing)
411416
end
412417

0 commit comments

Comments
 (0)