Skip to content

Commit 068a636

Browse files
committed
Allow for workers dying in the middle of cleanup
1 parent 75559cb commit 068a636

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/sch/Sch.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,15 @@ function cleanup_proc(state, p, log_sink)
409409

410410
# If the worker process is still alive, clean it up
411411
if wid in workers()
412-
remotecall_wait(_cleanup_proc, wid, state.uid, log_sink)
412+
try
413+
remotecall_wait(_cleanup_proc, wid, state.uid, log_sink)
414+
catch ex
415+
# We allow ProcessExitedException's, which means that the worker
416+
# shutdown halfway through cleanup.
417+
if !(ex isa ProcessExitedException)
418+
throw(ex)
419+
end
420+
end
413421
end
414422

415423
timespan_finish(ctx, :cleanup_proc, (;worker=wid), nothing)

0 commit comments

Comments
 (0)