Skip to content
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
4 changes: 3 additions & 1 deletion src/sch/Sch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,9 @@ function (ets::FireTaskSpec)()
bt = catch_backtrace()
# FIXME: Catch the correct task ID
thunk_id = first_task.thunk_id
put!(chan, TaskResult(pid, proc, thunk_id, CapturedException(err, bt), nothing))
if isopen(chan)
put!(chan, TaskResult(pid, proc, thunk_id, CapturedException(err, bt), nothing))
end
finally
@maybelog ctx timespan_finish(ctx, :fire, (;uid, worker=pid), nothing)
end
Expand Down
4 changes: 2 additions & 2 deletions src/utils/reuse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ function reusable_task_loop(chan::Channel{Any}, ready::Threads.Atomic{Bool})
while true
f = try
take!(chan)
catch
if !isopen(chan)
catch err
if !isopen(chan) || err isa InterruptException # scheduler exiting
return
else
rethrow()
Expand Down