Skip to content

Commit fc07107

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. Wait for the processor to be cleaned up in cleanup_proc()
1 parent 6542abd commit fc07107

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sch/Sch.jl

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

0 commit comments

Comments
 (0)