Skip to content

Streaming branch fixes #496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/sch/Sch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,15 @@ function cleanup_proc(state, p, log_sink)

# If the worker process is still alive, clean it up
if wid in workers()
remotecall_wait(_cleanup_proc, wid, state.uid, log_sink)
try
remotecall_wait(_cleanup_proc, wid, state.uid, log_sink)
catch ex
# We allow ProcessExitedException's, which means that the worker
# shutdown halfway through cleanup.
if !(ex isa ProcessExitedException)
rethrow()
end
end
end

timespan_finish(ctx, :cleanup_proc, (;worker=wid), nothing)
Expand Down
13 changes: 11 additions & 2 deletions src/sch/dynamic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,18 @@ function safepoint(state)
if state.halt.set
# Force dynamic thunks and listeners to terminate
for (inp_chan,out_chan) in values(state.worker_chans)
close(inp_chan)
close(out_chan)
# Closing these channels will fail if the worker died, which we
# allow.
try
close(inp_chan)
close(out_chan)
catch ex
if !(ex isa ProcessExitedException)
rethrow()
end
end
end

# Throw out of scheduler
throw(SchedulerHaltedException())
end
Expand Down
2 changes: 1 addition & 1 deletion src/sch/eager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const EAGER_STATE = Ref{Union{ComputeState,Nothing}}(nothing)

function eager_context()
if EAGER_CONTEXT[] === nothing
EAGER_CONTEXT[] = Context([myid(),workers()...])
EAGER_CONTEXT[] = Context(procs())
end
return EAGER_CONTEXT[]
end
Expand Down
Loading