Skip to content

Commit 445d5e7

Browse files
committed
Sch: Skip set_failed! store when result already set
1 parent e1343f9 commit 445d5e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sch/util.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function set_failed!(state, origin, thunk=origin)
238238
@dagdebug thunk :finish "Setting as failed"
239239
filter!(x -> x !== thunk, state.ready)
240240
# N.B. If origin === thunk, we assume that the caller has already set the error
241-
if origin !== thunk
241+
if origin !== thunk && !has_result(state, thunk)
242242
origin_ex = load_result(state, origin)
243243
if origin_ex isa RemoteException
244244
origin_ex = origin_ex.captured

0 commit comments

Comments
 (0)