We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bd2b06 commit 6feb22cCopy full SHA for 6feb22c
src/tapedtask.jl
@@ -69,11 +69,13 @@ function consume(ttask::TapedTask)
69
70
val = try
71
take!(ttask.produce_ch)
72
- catch e
73
- # return nothing to indicate the finish of the task
74
- isa(e, InvalidStateException) ? nothing : rethrow()
+ catch
+ isa(e, InvalidStateException) || rethrow()
+ istaskfailed(ttask.task) && throw(ttask.task.exception)
75
+ # TODO: we return nothing to indicate the end of a task,
76
+ # remove this when AdvancedPS is udpated.
77
+ istaskdone(ttask.task) && return nothing
78
end
- yield()
79
isa(val, TapedTaskException) && throw(val.exc)
80
return val
81
0 commit comments